diff options
author | Nick White <git@njw.name> | 2019-01-06 01:03:31 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-01-06 01:03:31 +0000 |
commit | d0c5f2c02ec2fd0626c0bb6f0cc3f986178b1b7d (patch) | |
tree | 8803f017c60553fa72f0197edaefb132188d5b94 /roles/ocropuser/tasks | |
parent | 8596687b33b8572c62236c06ed11aff12b782153 (diff) |
Add ocropuser role to install ocropus; tested and working
Diffstat (limited to 'roles/ocropuser/tasks')
-rw-r--r-- | roles/ocropuser/tasks/main.yml | 2 | ||||
-rw-r--r-- | roles/ocropuser/tasks/ocropus.yml | 33 |
2 files changed, 35 insertions, 0 deletions
diff --git a/roles/ocropuser/tasks/main.yml b/roles/ocropuser/tasks/main.yml new file mode 100644 index 0000000..79ae937 --- /dev/null +++ b/roles/ocropuser/tasks/main.yml @@ -0,0 +1,2 @@ +--- +- include: ocropus.yml diff --git a/roles/ocropuser/tasks/ocropus.yml b/roles/ocropuser/tasks/ocropus.yml new file mode 100644 index 0000000..51025e6 --- /dev/null +++ b/roles/ocropuser/tasks/ocropus.yml @@ -0,0 +1,33 @@ +--- +# Installs ocropus + +- name: Install ocropus dependencies + package: name={{ item }} state=present + with_items: + - git + - python-lxml + - python-pillow + - python2-pip + - scipy + - tkinter + +- name: Install extra dependencies with pip (as user) + pip: name={{ item }} extra_args="--user -U" + become: no + with_items: + - matplotlib + - numpy + +- name: Clone ocropus repository + git: + repo: https://github.com/tmbdev/ocropy/ + dest: /home/ec2-user/src/ocropy + depth: 1 + become: no + register: ocroclone + +- name: Install ocropus + command: python setup.py install + args: + chdir: /home/ec2-user/src/ocropy + when: ocroclone.changed |