--- # 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 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 become: no register: leptclone - name: Build leptonica 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 - name: Clone tesseract repository git: repo: https://github.com/nickjwhite/tesseract dest: /home/ec2-user/src/tesseract version: amibuild depth: 1 become: no register: tessclone - 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