diff options
author | Nick White <git@njw.name> | 2019-01-06 09:32:12 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-01-06 09:32:12 +0000 |
commit | f5385e25f40c8c9140bb9deacbfda42eaa5c8a1c (patch) | |
tree | 858f949b0bf19408fac3812b7435361c35055cf9 /roles/preprocessor | |
parent | 28549fb8233b36a2b1c30f66736e55e48ec78f3d (diff) |
Move scantailor under preprocessing role, and install pdfimages there
Diffstat (limited to 'roles/preprocessor')
-rw-r--r-- | roles/preprocessor/tasks/main.yml | 3 | ||||
-rw-r--r-- | roles/preprocessor/tasks/pdfimages.yml | 5 | ||||
-rw-r--r-- | roles/preprocessor/tasks/scantailor.yml | 41 |
3 files changed, 49 insertions, 0 deletions
diff --git a/roles/preprocessor/tasks/main.yml b/roles/preprocessor/tasks/main.yml new file mode 100644 index 0000000..e5823e4 --- /dev/null +++ b/roles/preprocessor/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- include: pdfimages.yml +- include: scantailor.yml diff --git a/roles/preprocessor/tasks/pdfimages.yml b/roles/preprocessor/tasks/pdfimages.yml new file mode 100644 index 0000000..81bd1eb --- /dev/null +++ b/roles/preprocessor/tasks/pdfimages.yml @@ -0,0 +1,5 @@ +--- +# Installs pdfimages + +- name: Install poppler-utils for pdfimages + package: name=poppler-utils state=present diff --git a/roles/preprocessor/tasks/scantailor.yml b/roles/preprocessor/tasks/scantailor.yml new file mode 100644 index 0000000..8a8820e --- /dev/null +++ b/roles/preprocessor/tasks/scantailor.yml @@ -0,0 +1,41 @@ +--- +# Installs scantailor + +- name: Install scantailor dependencies + package: name={{ item }} state=present + with_items: + - boost-devel + - cmake + - gcc-c++ + - git + - libjpeg-turbo-devel + - libpng-devel + - libtiff-devel + - libXrender-devel + - make + - qt-devel + - zlib-devel + +- name: Clone scantailor repository + git: + repo: https://github.com/scantailor/scantailor + dest: /home/ec2-user/src/scantailor + depth: 1 + become: no + register: scanclone + +- name: Configure and build scantailor + command: "{{ item }}" + args: + chdir: /home/ec2-user/src/scantailor + with_items: + - cmake . + - make + become: no + when: scanclone.changed + +- name: Install scantailor + command: make install + args: + chdir: /home/ec2-user/src/scantailor + when: scanclone.changed |