neo2.yml 1.34 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
---
2 3 4
- name: create destination directories
  become: yes
  file:
5
    path: "{{ texpath }}/{{ item }}/latex/uniinput"
6 7 8 9 10 11 12
    state: directory
    mode: 0755
  with_items:
  - tex
  - doc
  register: uniinputdir

julian.gethmann's avatar
julian.gethmann committed
13
- name: download uniinput
14 15 16
  get_url:
    url: "{{ item }}"
    dest: /tmp
julian.gethmann's avatar
julian.gethmann committed
17
    validate_certs: no
julian.gethmann's avatar
julian.gethmann committed
18 19 20
  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"
21
  when: uniinputdir.changed
julian.gethmann's avatar
julian.gethmann committed
22 23

- name: compile package docu
24 25 26
  command: pdflatex -interaction=nonstopmode uniinput.dtx
  args:
    chdir: /tmp
27
    creates: /tmp/uniinput.pdf
julian.gethmann's avatar
julian.gethmann committed
28
  ignore_errors: yes
29 30
  when: uniinputdir.changed
  register: pdf_file
julian.gethmann's avatar
julian.gethmann committed
31 32

- name: compile package
33 34 35 36
  command: latex uniinput.ins
  args:
    chdir: /tmp
    creates: /tmp/uniinput.sty
37 38
  when: uniinputdir.changed
  register: sty_file
julian.gethmann's avatar
julian.gethmann committed
39 40 41

- name: move style to LaTeX dir
  become: yes
42 43
  copy:
    src: /tmp/uniinput.sty
44
    dest: "{{ texpath }}/tex/latex/uniinput/uniinput.sty"
45
    remote_src: yes
46
    mode: 0755
julian.gethmann's avatar
julian.gethmann committed
47
  notify: update latex
48
  when: sty_file is defined and sty_file.changed
julian.gethmann's avatar
julian.gethmann committed
49 50 51

- name: move docu to LaTeX dir
  become: yes
52
  copy:
53
    src: /tmp/uniinput.pdf
54
    dest: "{{ texpath }}/doc/latex/uniinput/uniinput.pdf"
55
    remote_src: yes
56
    mode: 0755
julian.gethmann's avatar
julian.gethmann committed
57
  notify: update latex
58
  when: pdf_file is defined and pdf_file.changed