summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--host_vars/trainerami4
-rw-r--r--hosts1
-rw-r--r--roles/tesseractor/tasks/leptonica.yml3
-rw-r--r--roles/tesseractor/tasks/main.yml1
-rw-r--r--roles/tesseractor/tasks/tesseract.yml7
-rw-r--r--roles/tesseractor/tasks/usefulbits.yml15
6 files changed, 18 insertions, 13 deletions
diff --git a/host_vars/trainerami b/host_vars/trainerami
deleted file mode 100644
index ac67032..0000000
--- a/host_vars/trainerami
+++ /dev/null
@@ -1,4 +0,0 @@
----
-ansible_host: ec2-3-8-40-197.eu-west-2.compute.amazonaws.com
-ansible_user: ec2-user
-ansible_ssh_private_key_file: ~/rescribe/2018-natphil/aws/awsdev2.pem
diff --git a/hosts b/hosts
index 7d87a82..87d6b9f 100644
--- a/hosts
+++ b/hosts
@@ -1,3 +1,2 @@
[servers]
pipelineami
-trainerami
diff --git a/roles/tesseractor/tasks/leptonica.yml b/roles/tesseractor/tasks/leptonica.yml
index 9b07c9b..deee245 100644
--- a/roles/tesseractor/tasks/leptonica.yml
+++ b/roles/tesseractor/tasks/leptonica.yml
@@ -20,7 +20,6 @@
version: addinstall
depth: 1
become: no
- register: leptclone
- name: Build leptonica
command: make -f makefile.static {{ item }}
@@ -30,11 +29,9 @@
- nodebug
- SHARED=yes shared
become: no
- when: leptclone.changed
- name: Install leptonica
command: make -f makefile.static install
args:
chdir: /home/{{ ansible_user }}/src/leptonica/src
- when: leptclone.changed
notify: update ld.so
diff --git a/roles/tesseractor/tasks/main.yml b/roles/tesseractor/tasks/main.yml
index e406e2f..50bd106 100644
--- a/roles/tesseractor/tasks/main.yml
+++ b/roles/tesseractor/tasks/main.yml
@@ -3,3 +3,4 @@
- include: leptonica.yml
- include: tesseract.yml
- include: training.yml
+- include: usefulbits.yml
diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml
index 56d8750..892782b 100644
--- a/roles/tesseractor/tasks/tesseract.yml
+++ b/roles/tesseractor/tasks/tesseract.yml
@@ -28,18 +28,15 @@
version: amibuild
depth: 1
become: no
- register: tessclone
- name: Build tesseract and training tools
command: make all training
args:
- chdir=/home/{{ ansible_user }}/src/tesseract/simplemake
+ chdir: /home/{{ ansible_user }}/src/tesseract/simplemake
become: no
- when: tessclone.changed
- name: Install tesseract and training tools
command: make install install-training
args:
- chdir=/home/{{ ansible_user }}/src/tesseract/simplemake
- when: tessclone.changed
+ chdir: /home/{{ ansible_user }}/src/tesseract/simplemake
notify: update ld.so
diff --git a/roles/tesseractor/tasks/usefulbits.yml b/roles/tesseractor/tasks/usefulbits.yml
new file mode 100644
index 0000000..a0e5f54
--- /dev/null
+++ b/roles/tesseractor/tasks/usefulbits.yml
@@ -0,0 +1,15 @@
+---
+- name: Install useful dependencies
+ apt:
+ state: present
+ name:
+ - git
+
+- name: Clone useful repositories
+ git:
+ repo: "{{ item.url }}"
+ dest: "/home/{{ ansible_user }}/{{ item.name }}"
+ become: no
+ with_items:
+ - { url: "https://git.rescribe.xyz/sh", name: "sh" }
+ - { url: "https://git.rescribe.xyz/ground-truth", name: "ground-truth" }