Commit d2e0b3c2 authored by julian.gethmann's avatar julian.gethmann

Update LaTeX formulas to be more stateless

* Still some statefull things that cause a "change" everytime called
* Still Font issue not solved
parent ef83b5ec
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- name: update latex local - name: update latex local
become: yes become: yes
environment: environment:
PATH: "{{ lookup('env', 'PATH') }}" PATH: "{{ lookup('env', 'PATH') }}"
command: mktexlsr "{{ texpath }}" command: mktexlsr "{{ texpath }}"
...@@ -26,3 +26,7 @@ ...@@ -26,3 +26,7 @@
environment: environment:
PATH: "{{ lookup('env', 'PATH') }}" PATH: "{{ lookup('env', 'PATH') }}"
command: texhash command: texhash
- name: lock root user
become: yes
command: passwd -l root
--- ---
- name: install Axel Bernhard's BibTeX-class for poster kurz.bst - name: install Axel Bernhard's BibTeX-class for poster kurz.bst
become: yes become: yes
copy: src=kurz.bst dest=/usr/local/texlive/texmf-local/bibtex/bst/ backup=yes copy:
src: kurz.bst
dest: /usr/local/texlive/texmf-local/bibtex/bst/
backup: yes
notify: hash latex notify: hash latex
tags: kurzbst tags: kurzbst
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
- name: rooting - name: rooting
action: shell passwd -u root action: shell passwd -u root
become: yes become: yes
changed_when: False
notify: lock root user
- name: install dependencies - name: install dependencies
dnf: name="{{item}}" state=latest dnf:
name: "{{ item }}"
state: present
become: yes become: yes
with_items: with_items:
- texlive-a0poster - texlive-a0poster
...@@ -24,7 +28,7 @@ ...@@ -24,7 +28,7 @@
- "{{ kit_tikz }}" - "{{ kit_tikz }}"
# ansible 2.0 # ansible 2.0
#- download current zip files #- download current zip files
# unarchive: src="{{item}}" dest=~/ansible/roles/latex/files/ copy=no # unarchive: src="{{item}}" dest=~/ansible/roles/latex/files/ copy=no
# delegate_to: 127.0.0.1 # delegate_to: 127.0.0.1
...@@ -45,18 +49,27 @@ ...@@ -45,18 +49,27 @@
# tags: kit # tags: kit
- name: clone git repo - name: clone git repo
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') }} 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') }}"
become: yes become: yes
register: kit_git
# This causes status change (because of the recursive copy I think)
- name: copy files - name: copy files
copy: src={{ texpath }}/KIT/ dest={{ texpath }} copy:
src: "{{ texpath }}/KIT/"
dest: "{{ texpath }}"
become: yes become: yes
notify: notify:
- update latex - update latex
when: kit_git|changed
# - name: cleanup # - name: cleanup
# file: state=absent dest=/tmp/{{item}} # file: state=absent dest=/tmp/{{item}}
# with_items: # with_items:
# - Install-En.pdf # - Install-En.pdf
# - Install-De.pdf # - Install-De.pdf
# - Install-En.txt # - Install-En.txt
...@@ -75,12 +88,16 @@ ...@@ -75,12 +88,16 @@
# - KIT-Vorlagen-Poster-LaTeX_06-12.zip # - KIT-Vorlagen-Poster-LaTeX_06-12.zip
# - KIT-Vorlagen-Folien.zip # - KIT-Vorlagen-Folien.zip
# - KIT-Vorlagen-Poster.zip # - KIT-Vorlagen-Poster.zip
# tags: # tags:
# - latex # - latex
# - kit # - kit
- name: hack Helvetica into KIT styles due to broken font installation - name: hack Helvetica into KIT styles due to broken font installation
lineinfile: line="\\RequirePackage{helvet}" regexp="\\RequirePackage{uarial}" dest={{ texpath }}/tex/latex/KIT/{{item}} backup=yes lineinfile:
line: "\\RequirePackage{helvet}"
regexp: "\\RequirePackage{uarial}"
dest: "{{ texpath }}/tex/latex/KIT/{{item}}"
backup: yes
become: yes become: yes
with_items: with_items:
- beamerthemeKIT.sty - beamerthemeKIT.sty
...@@ -90,12 +107,13 @@ ...@@ -90,12 +107,13 @@
tags: tags:
- latex - latex
- kit - kit
when: kit_git|changed
# TODO # TODO
# - name: download uarial # - name: download uarial
# unarchive: src="ftp://ftp.dante.de/tex-archive/fonts/urw/arial.zip" dest={{ texpath }}/KIT/arial creates={{ texpath }}/KIT/arial # unarchive: src="ftp://ftp.dante.de/tex-archive/fonts/urw/arial.zip" dest={{ texpath }}/KIT/arial creates={{ texpath }}/KIT/arial
# become: yes # become: yes
# #
# - name: create missing directories # - name: create missing directories
# file: state=directory path={{ texpath }}/{{ item }} # file: state=directory path={{ texpath }}/{{ item }}
# with_items: # with_items:
...@@ -108,20 +126,20 @@ ...@@ -108,20 +126,20 @@
# - dvips/config # - dvips/config
# - doc/fonts # - doc/fonts
# become: yes # become: yes
# notify: # notify:
# - update latex local # - update latex local
# - update fonts # - update fonts
# - update latex # - update latex
# #
# - name: move afm, tfm, type1, vf dirs # - name: move afm, tfm, type1, vf dirs
# copy: src={{ item }} dest={{ texpath }}/fonts/{{ item }}/arial # copy: src={{ item }} dest={{ texpath }}/fonts/{{ item }}/arial
# with_items: # with_items:
# - afm # - afm
# - tfm # - tfm
# - type1 # - type1
# - vf # - vf
# become: yes # become: yes
# notify: # notify:
# - update latex local # - update latex local
# - update fonts # - update fonts
# - update latex # - update latex
...@@ -129,7 +147,7 @@ ...@@ -129,7 +147,7 @@
# - name: copy latex dir # - name: copy latex dir
# copy: src=latex dest={{ texpath }}/tex/latex/ua1 # copy: src=latex dest={{ texpath }}/tex/latex/ua1
# become: yes # become: yes
# notify: # notify:
# - update latex local # - update latex local
# - update fonts # - update fonts
# - update latex # - update latex
......
...@@ -8,15 +8,14 @@ ...@@ -8,15 +8,14 @@
- name: Download common MS fonts - name: Download common MS fonts
get_url: get_url:
dest: /tmp/ dest: /tmp/
url: "https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts" url: https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
mode: 777 mode: 0777
register: tex_fonts_dl_ok register: tex_fonts_dl_ok
when: gnff_available.changed when: gnff_available.changed
- name: Install getnonfreefonts - name: Install getnonfreefonts
environment: environment:
PATH: "{{ lookup('env', 'PATH') }}" PATH: "{{ lookup('env', 'PATH') }}"
become: yes
command: /tmp/install-getnonfreefonts command: /tmp/install-getnonfreefonts
when: gnff_available.changed when: gnff_available.changed
register: gnff_downloaded register: gnff_downloaded
......
--- ---
- name: Install DPG-Tagungen document class - name: Install DPG-Tagungen document class
become: yes become: yes
copy: src=scdpg.cls dest={{ texpath }}/tex/latex/ copy:
src: scdpg.cls
dest: "{{ texpath }}/tex/latex/"
notify: hash latex notify: hash latex
tags: latex tags: latex
- name: Install JACoW-Tagungen document class - name: Install JACoW-Tagungen document class
become: yes become: yes
copy: src=jacow.cls dest={{ texpath }}/tex/latex/ copy:
src: jacow.cls
dest: "{{ texpath }}/tex/latex/"
notify: hash latex notify: hash latex
tags: latex tags: latex
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
become: yes become: yes
copy: copy:
src: /tmp/uniinput.sty src: /tmp/uniinput.sty
dest: "{{ texpath }}/tex/latex/uniinput/" dest: "{{ texpath }}/tex/latex/uniinput/uniinput.sty"
remote_src: yes remote_src: yes
notify: update latex notify: update latex
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
become: yes become: yes
copy: copy:
src: /tmp/uniinput.pdf src: /tmp/uniinput.pdf
dest: "{{ texpath }}/doc/latex/uniinput/" dest: "{{ texpath }}/doc/latex/uniinput/uniinput.pdf"
remote_src: yes remote_src: yes
notify: update latex notify: update latex
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment