KITLaTeX.yml 2.04 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:
julian.gethmann's avatar
julian.gethmann committed
10
    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", "{{ kit_tikz }}",]
11
    state: present
julian.gethmann's avatar
julian.gethmann committed
12
13
  become: yes

14
15
16
17
18
- name: make tmpdir
  tempfile:
    prefix: ansi
    state: directory
  register: tmpdir
julian.gethmann's avatar
julian.gethmann committed
19

20
21
22
23
24
25
26
27
- name: Add ssh-key for the LaTeX repository
  become: yes
  copy:
    src: gitlab_ssh_key
    dest: "/tmp/gitlab_ssh_key"
    mode: 0600
    backup: no

28
# This should be changed when the Arial task is working
julian.gethmann's avatar
julian.gethmann committed
29
- name: clone git repo
30
  git:
31
    repo: "ssh://git@git.scc.kit.edu:/las-software/15-4-Utilities/KITlatex.git"
32
    dest: "{{ tmpdir.path }}"
33
    clone: yes
34
    version: helvetica
35
    update: yes
36
37
    key_file: "/tmp/gitlab_ssh_key"
    accept_hostkey: yes
julian.gethmann's avatar
julian.gethmann committed
38
  become: yes
39
  register: kit_git
julian.gethmann's avatar
julian.gethmann committed
40

41
42
43
44
45
46
47
- name: create tex dir
  become: yes
  file:
    path: "{{ texpath }}/tex/latex/KIT"
    state: directory

- name: copy tex files
48
  become: yes
49
50
  synchronize:
    src: "{{ tmpdir.path }}/tex/latex/KIT"
51
    dest: "{{ texpath }}/tex/latex"
julian.gethmann's avatar
julian.gethmann committed
52
53
  notify:
  - update latex
54
  delegate_to: "{{ inventory_hostname }}"
julian.gethmann's avatar
julian.gethmann committed
55

56
57
58
59
60
- name: create doc dir
  become: yes
  file:
    path: "{{ texpath }}/doc/latex/KIT"
    state: directory
julian.gethmann's avatar
julian.gethmann committed
61

62
63
- name: copy pdf files
  become: yes
64
65
66
  synchronize:
    src: "{{ tmpdir.path }}/doc/latex/KIT"
    dest: "{{ texpath }}/doc/latex/KIT"
67
68
  notify:
  - update latex
julian.gethmann's avatar
julian.gethmann committed
69
  delegate_to: "{{ inventory_hostname }}"
70
71

# This should be deleted when the Arial task is working
julian.gethmann's avatar
julian.gethmann committed
72
- name: hack Helvetica into KIT styles due to broken font installation
73
74
  lineinfile:
    line: "\\RequirePackage{helvet}"
75
76
    regexp: "\\RequirePackage{(uarial|helvet)}"
    dest: "{{ texpath }}/tex/latex/KIT/{{ item }}"
77
    backup: yes
julian.gethmann's avatar
julian.gethmann committed
78
79
80
81
82
83
84
85
86
  become: yes
  with_items:
  - beamerthemeKIT.sty
  - KITbrief.cls
  - KITfax.cls
  - KITposter.cls
  tags:
  - latex
  - kit