KITLaTeX.yml 2.06 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
12
    skip_broken: yes
julian.gethmann's avatar
julian.gethmann committed
13 14
  become: yes

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

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

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

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

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

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

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

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