From 2a1971bc3612904cc4b3cbca7a562e175535b054 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 4 May 2020 17:39:38 +0100 Subject: Fix up tesseract rules and add useful stuff for training --- host_vars/trainerami | 4 ---- hosts | 1 - roles/tesseractor/tasks/leptonica.yml | 3 --- roles/tesseractor/tasks/main.yml | 1 + roles/tesseractor/tasks/tesseract.yml | 7 ++----- roles/tesseractor/tasks/usefulbits.yml | 15 +++++++++++++++ 6 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 host_vars/trainerami create mode 100644 roles/tesseractor/tasks/usefulbits.yml 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" } -- cgit v1.2.1-24-ge1ad