summaryrefslogtreecommitdiff
path: root/roles/rudpad/tasks/main.yml
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-08-18 22:36:48 +0100
committerNick White <git@njw.name>2021-08-18 22:36:48 +0100
commit89cff0ecf987fa69edc52ee1c501b7073a303d0e (patch)
tree63c378326c1458addc816e20ee5ba2163c0af38d /roles/rudpad/tasks/main.yml
parent48020c6e284efe49de173d414842b916de9845a7 (diff)
Add rudpad ami rules
Diffstat (limited to 'roles/rudpad/tasks/main.yml')
-rw-r--r--roles/rudpad/tasks/main.yml82
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