--- - name: Update apt apt: update_cache: yes - name: Install packages apt: state: present name: - gcc - git - imagemagick - libssl-dev # needed for getxbook - make - poppler-utils # for pdfimages - name: Download Go get_url: url: https://golang.org/dl/go1.17.linux-amd64.tar.gz dest: /home/{{ ansible_user }} become: no - name: Install Go unarchive: dest: /usr/local src: /home/{{ ansible_user }}/go1.17.linux-amd64.tar.gz remote_src: true - name: Remove Go download file: path: /home/{{ ansible_user }}/go1.17.linux-amd64.tar.gz state: absent become: no - name: Add Go tools to path lineinfile: path: /home/{{ ansible_user }}/.profile line: PATH=$PATH:/usr/local/go/bin:$HOME/go/bin become: no - name: Get go repos git: dest: /home/{{ ansible_user }}/src/{{ item }} repo: https://git.rescribe.xyz/{{ item }} force: yes become: no with_items: - bookpipeline - preproc - utils - name: Download necessary parts for rescribe building command: cmd: /usr/local/go/bin/go generate chdir: /home/{{ ansible_user }}/src/bookpipeline/cmd/rescribe become: no environment: PATH: /usr/local/go/bin - name: Get and build go repos command: cmd: /usr/local/go/bin/go install ./... chdir: /home/{{ ansible_user }}/src/bookpipeline become: no with_items: - bookpipeline - preproc - utils - name: Get getxbook git: dest: /home/{{ ansible_user }}/src/getxbook repo: https://git.njw.name/getxbook.git force: yes become: no - name: Build getxbook make: chdir: /home/{{ ansible_user }}/src/getxbook target: all become: no - name: Install getxbook make: chdir: /home/{{ ansible_user }}/src/getxbook target: install params: PREFIX: /home/{{ ansible_user }}/.local