--- - name: create destination directories become: yes file: path: "/usr/share/texlive/texmf-local/{{ 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 - name: compile package command: latex uniinput.ins args: chdir: /tmp creates: /tmp/uniinput.sty - name: move style to LaTeX dir become: yes copy: src: /tmp/uniinput.sty dest: "/usr/share/texlive/texmf-local/tex/latex/uniinput/" remote_src: yes notify: update latex - name: move docu to LaTeX dir become: yes copy: src: /tmp/uniinput.pdf dest: "/usr/share/texlive/texmf-local/doc/latex/uniinput/" remote_src: yes notify: update latex