From 8596687b33b8572c62236c06ed11aff12b782153 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 5 Jan 2019 23:41:39 +0000 Subject: Don't clone or build software with become This is so that the sources are appropriately owned for easy modification and rebuilding if needed later. --- roles/tesseractor/tasks/tesseract.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'roles/tesseractor') diff --git a/roles/tesseractor/tasks/tesseract.yml b/roles/tesseractor/tasks/tesseract.yml index e63cfee..afb408a 100644 --- a/roles/tesseractor/tasks/tesseract.yml +++ b/roles/tesseractor/tasks/tesseract.yml @@ -22,10 +22,21 @@ dest: /home/ec2-user/src/leptonica version: addinstall depth: 1 + become: no register: leptclone - name: Build leptonica - command: make -f makefile.static SHARED=yes install + command: make -f makefile.static {{ item }} + args: + chdir: /home/ec2-user/src/leptonica/src + with_items: + - SHARED=yes shared + - nodebug + become: no + when: leptclone.changed + +- name: Install leptonica + command: make -f makefile.static install args: chdir: /home/ec2-user/src/leptonica/src when: leptclone.changed @@ -36,8 +47,14 @@ dest: /home/ec2-user/src/tesseract version: amibuild depth: 1 + become: no register: tessclone -- name: Build and install tesseract +- name: Build tesseract + make: chdir=/home/ec2-user/src/tesseract/simplemake + become: no + when: tessclone.changed + +- name: Install tesseract make: chdir=/home/ec2-user/src/tesseract/simplemake target=install when: tessclone.changed -- cgit v1.2.1-24-ge1ad