From 6e4d1eb45e7ef933b804d8ab76ac1e37ba4fb076 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 5 Jan 2019 01:57:42 +0000 Subject: Separate out roles and groups better --- roles/devami/tasks/main.yml | 3 -- roles/devami/tasks/tesseract.yml | 56 ----------------------------------- roles/devami/tasks/update.yml | 5 ---- roles/server/tasks/main.yml | 2 ++ roles/server/tasks/update.yml | 5 ++++ roles/tesseractor/tasks/main.yml | 2 ++ roles/tesseractor/tasks/tesseract.yml | 56 +++++++++++++++++++++++++++++++++++ 7 files changed, 65 insertions(+), 64 deletions(-) delete mode 100644 roles/devami/tasks/main.yml delete mode 100644 roles/devami/tasks/tesseract.yml delete mode 100644 roles/devami/tasks/update.yml create mode 100644 roles/server/tasks/main.yml create mode 100644 roles/server/tasks/update.yml create mode 100644 roles/tesseractor/tasks/main.yml create mode 100644 roles/tesseractor/tasks/tesseract.yml (limited to 'roles') diff --git a/roles/devami/tasks/main.yml b/roles/devami/tasks/main.yml deleted file mode 100644 index cf0a946..0000000 --- a/roles/devami/tasks/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- include: update.yml -- include: tesseract.yml diff --git a/roles/devami/tasks/tesseract.yml b/roles/devami/tasks/tesseract.yml deleted file mode 100644 index 5e04296..0000000 --- a/roles/devami/tasks/tesseract.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -# Installs tesseract - -- name: Install tesseract dependencies - package: name={{ item }} state=present - with_items: - - gcc-c++ - - make - - libpng12-devel - - libjpeg-turbo-devel - - libtiff-devel - - zlib-devel - -- name: Install tesseract training dependencies - package: name={{ item }} state=present - with_items: - - libicu-devel - - pango-devel - - cairo-devel - -- name: Install extra tesseract development dependencies - package: name={{ item }} state=present - with_items: - - git - -- name: Clone leptonica repository - git: - repo: https://github.com/nickjwhite/leptonica - dest: /home/ec2-user/src/leptonica - version: addinstall - depth: 1 - -- name: Configure leptonica environ.h - lineinfile: - dest: /home/ec2-user/src/leptonica/src/environ.h - line: "{{ item }}" - insertbefore: "^#endif * LEPTONICA_ENVIRON_H" - with_items: - - "#define HAVE_FMEMOPEN 1" - - "#define HAVE_FSTATAT 1" - -- name: Build leptonica - make: - chdir: /home/ec2-user/src/leptonica/src - target: "-f makefile.static install" - params: SHARED=yes - -- name: Clone tesseract repository - git: - repo: https://github.com/nickjwhite/tesseract - dest: /home/ec2-user/src/tesseract - version: simplemakev4 - depth: 1 - -- name: Build and install tesseract - make: chdir=/home/ec2-user/src/tesseract target=install diff --git a/roles/devami/tasks/update.yml b/roles/devami/tasks/update.yml deleted file mode 100644 index 99e0dcd..0000000 --- a/roles/devami/tasks/update.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# Updates the image - -- name: Update all packages - package: name=* state=latest diff --git a/roles/server/tasks/main.yml b/roles/server/tasks/main.yml new file mode 100644 index 0000000..41d30cb --- /dev/null +++ b/roles/server/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include: update.yml diff --git a/roles/server/tasks/update.yml b/roles/server/tasks/update.yml new file mode 100644 index 0000000..99e0dcd --- /dev/null +++ b/roles/server/tasks/update.yml @@ -0,0 +1,5 @@ +--- +# Updates the image + +- name: Update all packages + package: name=* state=latest diff --git a/roles/tesseractor/tasks/main.yml b/roles/tesseractor/tasks/main.yml new file mode 100644 index 0000000..48f791f --- /dev/null +++ b/roles/tesseractor/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include: tesseract.yml diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml new file mode 100644 index 0000000..5e04296 --- /dev/null +++ b/roles/tesseractor/tasks/tesseract.yml @@ -0,0 +1,56 @@ +--- +# Installs tesseract + +- name: Install tesseract dependencies + package: name={{ item }} state=present + with_items: + - gcc-c++ + - make + - libpng12-devel + - libjpeg-turbo-devel + - libtiff-devel + - zlib-devel + +- name: Install tesseract training dependencies + package: name={{ item }} state=present + with_items: + - libicu-devel + - pango-devel + - cairo-devel + +- name: Install extra tesseract development dependencies + package: name={{ item }} state=present + with_items: + - git + +- name: Clone leptonica repository + git: + repo: https://github.com/nickjwhite/leptonica + dest: /home/ec2-user/src/leptonica + version: addinstall + depth: 1 + +- name: Configure leptonica environ.h + lineinfile: + dest: /home/ec2-user/src/leptonica/src/environ.h + line: "{{ item }}" + insertbefore: "^#endif * LEPTONICA_ENVIRON_H" + with_items: + - "#define HAVE_FMEMOPEN 1" + - "#define HAVE_FSTATAT 1" + +- name: Build leptonica + make: + chdir: /home/ec2-user/src/leptonica/src + target: "-f makefile.static install" + params: SHARED=yes + +- name: Clone tesseract repository + git: + repo: https://github.com/nickjwhite/tesseract + dest: /home/ec2-user/src/tesseract + version: simplemakev4 + depth: 1 + +- name: Build and install tesseract + make: chdir=/home/ec2-user/src/tesseract target=install -- cgit v1.2.1-24-ge1ad