KITLaTeX.yml 2.21 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
  dnf:
10 11 12 13 14 15 16 17
    name: ["texlive-a0poster", "texlive-beamer", "texlive-bophook", "texlive-boxedminipage", "texlive-dinbrief", "texlive-hyperref", "texlive-lettrine", "texlive-mathpazo", "texlive-rcs", "texlive-sciposter", "texlive-shadow", "texlive-pgf", "texlive-xcolor",]
    state: present
    skip_broken: yes
  become: yes

- name: install dependencies
  dnf:
    name: "{{ kit_tikz }}"
18
    state: present
julian.gethmann's avatar
julian.gethmann committed
19
    skip_broken: yes
julian.gethmann's avatar
julian.gethmann committed
20 21
  become: yes

22 23 24 25
- name: make tmpdir
  tempfile:
    prefix: ansi
    state: directory
26
    mode: 0755
27
  register: tmpdir
julian.gethmann's avatar
julian.gethmann committed
28

29 30 31 32 33 34 35 36
- name: Add ssh-key for the LaTeX repository
  become: yes
  copy:
    src: gitlab_ssh_key
    dest: "/tmp/gitlab_ssh_key"
    mode: 0600
    backup: no

37
# This should be changed when the Arial task is working
julian.gethmann's avatar
julian.gethmann committed
38
- name: clone git repo
39
  git:
40
    repo: "ssh://git@git.scc.kit.edu:/las-software/15-4-Utilities/KITlatex.git"
41
    dest: "{{ tmpdir.path }}"
42
    clone: yes
43
    version: helvetica
44
    update: yes
45 46
    key_file: "/tmp/gitlab_ssh_key"
    accept_hostkey: yes
julian.gethmann's avatar
julian.gethmann committed
47
  become: yes
48
  register: kit_git
julian.gethmann's avatar
julian.gethmann committed
49

50 51 52 53 54
- name: create tex dir
  become: yes
  file:
    path: "{{ texpath }}/tex/latex/KIT"
    state: directory
55
    mode: 0755
56 57

- name: copy tex files
58
  become: yes
59 60
  synchronize:
    src: "{{ tmpdir.path }}/tex/latex/KIT"
61
    dest: "{{ texpath }}/tex/latex"
julian.gethmann's avatar
julian.gethmann committed
62 63
  notify:
  - update latex
64
  delegate_to: "{{ inventory_hostname }}"
julian.gethmann's avatar
julian.gethmann committed
65

66 67 68 69 70
- name: create doc dir
  become: yes
  file:
    path: "{{ texpath }}/doc/latex/KIT"
    state: directory
71
    mode: 0755
julian.gethmann's avatar
julian.gethmann committed
72

73 74
- name: copy pdf files
  become: yes
75 76 77
  synchronize:
    src: "{{ tmpdir.path }}/doc/latex/KIT"
    dest: "{{ texpath }}/doc/latex/KIT"
78 79
  notify:
  - update latex
julian.gethmann's avatar
julian.gethmann committed
80
  delegate_to: "{{ inventory_hostname }}"
81 82

# This should be deleted when the Arial task is working
julian.gethmann's avatar
julian.gethmann committed
83
- name: hack Helvetica into KIT styles due to broken font installation
84
  lineinfile:
85 86
    line: "\\\\RequirePackage{helvet}"
    regexp: "\\\\RequirePackage{(uarial|helvet)}"
87
    dest: "{{ texpath }}/tex/latex/KIT/{{ item }}"
88
    backup: yes
julian.gethmann's avatar
julian.gethmann committed
89 90 91 92 93 94 95 96 97
  become: yes
  with_items:
  - beamerthemeKIT.sty
  - KITbrief.cls
  - KITfax.cls
  - KITposter.cls
  tags:
  - latex
  - kit