KITLaTeX.yml 4.2 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1 2 3 4
---
- name: rooting
  action: shell passwd -u root
  become: yes
5 6
  changed_when: False
  notify: lock root user
julian.gethmann's avatar
julian.gethmann committed
7 8

- name: install dependencies
9 10 11
  dnf:
    name: "{{ item }}"
    state: present
julian.gethmann's avatar
julian.gethmann committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
  become: yes
  with_items:
  - texlive-a0poster
  - texlive-beamer
  - texlive-bophook
  - texlive-boxedminipage
  - texlive-dinbrief
  - texlive-hyperref
  - texlive-lettrine
  - texlive-mathpazo
  - texlive-rcs
  # - texlive-refcount
  - texlive-sciposter
  - texlive-shadow
  - texlive-pgf
  - texlive-xcolor
  - "{{ kit_tikz }}"


31
# ansible 2.0
julian.gethmann's avatar
julian.gethmann committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#- download current zip files
#  unarchive: src="{{item}}" dest=~/ansible/roles/latex/files/ copy=no
#  delegate_to: 127.0.0.1
#  with_items:
#  - "https://intranet.kit.edu/downloads/KIT-Vorlagen-Folien.zip"
#  - "https://intranet.kit.edu/downloads/KIT-Vorlagen-Poster.zip"

    # - name: Unzip KIT-Classes
    #   become: yes
    #   #shell: ls /tmp > /tmp/list
    #   unarchive: src={{ item }}.zip dest=/usr/share/texlive/texmf-local/
    #   with_items:
    #           - KITbase
    #           - KITbeamer
    #           - KITbrief
    #           - KITposter
    #   notify: update latex
    #   tags: kit

- name: clone git repo
52 53 54 55 56
  git:
    repo: https://git.scc.kit.edu/gethmann/KITlatex.git
    dest: "{{ texpath }}/KIT"
    clone: yes
    key_file: "{{ lookup('file', '/home/gethmann/.ssh/id_rsa.pub') }}"
julian.gethmann's avatar
julian.gethmann committed
57
  become: yes
58
  register: kit_git
julian.gethmann's avatar
julian.gethmann committed
59

60
# This causes status change (because of the recursive copy I think)
julian.gethmann's avatar
julian.gethmann committed
61
- name: copy files
62 63 64
  copy:
    src: "{{ texpath }}/KIT/"
    dest: "{{ texpath }}"
julian.gethmann's avatar
julian.gethmann committed
65 66 67
  become: yes
  notify:
  - update latex
68
  when: kit_git|changed
julian.gethmann's avatar
julian.gethmann committed
69 70 71

  # - name: cleanup
  #   file: state=absent dest=/tmp/{{item}}
72
  #   with_items:
julian.gethmann's avatar
julian.gethmann committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
  #   - Install-En.pdf
  #   - Install-De.pdf
  #   - Install-En.txt
  #   - Install-De.txt
  #   - KITbase.zip
  #   - KITbeamerXmpl.zip
  #   - KITbeamer.zip
  #   - KIT_Briefvorlagen_LaTeX.zip
  #   - KITbriefXmpl.zip
  #   - KITbrief.zip
  #   - KITmanualD.pdf
  #   - KITmanualE.pdf
  #   - KITposterXmpl.zip
  #   - KITposter.zip
  #   - KIT-Vorlagen-Folien-LaTeX_06-12.zip
  #   - KIT-Vorlagen-Poster-LaTeX_06-12.zip
  #   - KIT-Vorlagen-Folien.zip
  #   - KIT-Vorlagen-Poster.zip
91
  #   tags:
julian.gethmann's avatar
julian.gethmann committed
92 93 94 95
  #   - latex
  #   - kit

- name: hack Helvetica into KIT styles due to broken font installation
96 97 98 99 100
  lineinfile:
    line: "\\RequirePackage{helvet}"
    regexp: "\\RequirePackage{uarial}"
    dest: "{{ texpath }}/tex/latex/KIT/{{item}}"
    backup: yes
julian.gethmann's avatar
julian.gethmann committed
101 102 103 104 105 106 107 108 109
  become: yes
  with_items:
  - beamerthemeKIT.sty
  - KITbrief.cls
  - KITfax.cls
  - KITposter.cls
  tags:
  - latex
  - kit
110
  when: kit_git|changed
julian.gethmann's avatar
julian.gethmann committed
111 112 113 114 115

    # TODO
    # - name: download uarial
    #   unarchive: src="ftp://ftp.dante.de/tex-archive/fonts/urw/arial.zip" dest={{ texpath }}/KIT/arial creates={{ texpath }}/KIT/arial
    #   become: yes
116
    #
julian.gethmann's avatar
julian.gethmann committed
117 118 119 120 121 122 123 124 125 126 127 128
    # - name: create missing directories
    #   file: state=directory path={{ texpath }}/{{ item }}
    #   with_items:
    #   - fonts/afm/urw
    #   - fonts/tfm/urw
    #   - fonts/type1/urw
    #   - fonts/vf/urw
    #   - fonts/map/dvips/ua1
    #   - fonts/map/vtex
    #   - dvips/config
    #   - doc/fonts
    #   become: yes
129
    #   notify:
julian.gethmann's avatar
julian.gethmann committed
130 131 132 133 134 135
    #   - update latex local
    #   - update fonts
    #   - update latex
    #
    # - name: move afm, tfm, type1, vf dirs
    #   copy: src={{ item }} dest={{ texpath }}/fonts/{{ item }}/arial
136
    #   with_items:
julian.gethmann's avatar
julian.gethmann committed
137 138 139 140 141
    #   - afm
    #   - tfm
    #   - type1
    #   - vf
    #   become: yes
142
    #   notify:
julian.gethmann's avatar
julian.gethmann committed
143 144 145 146 147 148 149
    #   - update latex local
    #   - update fonts
    #   - update latex
    #
    # - name: copy latex dir
    #   copy: src=latex dest={{ texpath }}/tex/latex/ua1
    #   become: yes
150
    #   notify:
julian.gethmann's avatar
julian.gethmann committed
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
    #   - update latex local
    #   - update fonts
    #   - update latex
    #
    # - name: copy map dir
    #   copy: src={{ item.from }} dest={{ texpath }}/{{ item.to }}
    #   with_items:
    #   - {from: "map/ua1.map", to: "dvips/config"}
    #   - {from: "map/ua1.map", to: "fonts/map/dvips/ua1"}
    #   - {from: "map/ua1.ali", to: "fonts/map/vtex"}
    #   become: yes
    #   notify:
    #   - update latex local
    #   - update fonts
    #   - update latex
    #
    # - name: copy docu 1/2
    #   copy: src={{ item }} dest={{ texpath }}/doc/fonts/urw
    #   with_items:
    #   - doc
    #   - README
    #   become: yes