--- - name: create destination directories become: yes file: path: "{{ texpath }}/{{ item }}/latex/uniinput" state: directory mode: 0755 with_items: - tex - doc register: uniinputdir - name: download uniinput get_url: url: "{{ item }}" dest: /tmp with_items: - "http://wiki.neo-layout.org/export/HEAD/latex/Standard-LaTeX/uniinput.dtx" - "http://wiki.neo-layout.org/export/HEAD/latex/Standard-LaTeX/uniinput.ins" when: uniinputdir.changed - name: compile package docu command: pdflatex -interaction=nonstopmode uniinput.dtx args: chdir: /tmp creates: /tmp/uniinput.pdf ignore_errors: yes when: uniinputdir.changed register: pdf_file - name: compile package command: latex uniinput.ins args: chdir: /tmp creates: /tmp/uniinput.sty when: uniinputdir.changed register: sty_file - name: move style to LaTeX dir become: yes copy: src: /tmp/uniinput.sty dest: "{{ texpath }}/tex/latex/uniinput/uniinput.sty" remote_src: yes notify: update latex when: sty_file is defined and sty_file.changed - name: move docu to LaTeX dir become: yes copy: src: /tmp/uniinput.pdf dest: "{{ texpath }}/doc/latex/uniinput/uniinput.pdf" remote_src: yes notify: update latex when: pdf_file is defined and pdf_file.changed