diff options
Diffstat (limited to 'roles/rudpad')
-rw-r--r-- | roles/rudpad/tasks/main.yml | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/roles/rudpad/tasks/main.yml b/roles/rudpad/tasks/main.yml new file mode 100644 index 0000000..eb26d81 --- /dev/null +++ b/roles/rudpad/tasks/main.yml @@ -0,0 +1,82 @@ +--- + +- 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: Add Go tool path to path + lineinfile: + path: /home/{{ ansible_user }}/.profile + line: PATH=$PATH:/usr/local/go/bin:$HOME/go/bin + +- 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 |