|
1 |
| -- name: create tlmgr usertree |
| 1 | +- name: clone latex template |
2 | 2 | become: true
|
3 | 3 | become_user: zds
|
4 |
| - shell: tlmgr init-usertree |
5 |
| - args: |
6 |
| - creates: $HOME/texmf |
7 |
| - tags: |
8 |
| - - bootstrap |
9 |
| - |
10 |
| -- name: create ansible state if non-existant |
11 |
| - file: |
12 |
| - path: /opt/zds/texmf/ansible-state |
13 |
| - state: touch |
14 |
| - mode: 0666 |
15 |
| - tags: |
16 |
| - - bootstrap |
| 4 | + git: |
| 5 | + repo: "https://github.com/zestedesavoir/latex-template/" |
| 6 | + dest: "{{ template_dir }}" |
| 7 | + notify: run texhash |
17 | 8 |
|
18 |
| -- name: check ansible state |
19 |
| - slurp: src=/opt/zds/texmf/ansible-state |
20 |
| - register: installed_packages |
21 |
| - |
22 |
| -- name: install packages |
| 9 | +- name: install latex packages |
23 | 10 | become: true
|
24 | 11 | become_user: zds
|
25 |
| - shell: > |
26 |
| - # we make sure that tlmgr repository correspond to texlive annual release |
27 |
| - texlive_year=$(tlmgr --version) && |
28 |
| - texlive_year=$(echo -n $texlive_year | tail -c 4) && |
29 |
| - tlmgr option repository http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/$texlive_year/tlnet-final && |
30 |
| - # we tell updmap to go user mode, not system mode |
31 |
| - updmap-user && |
32 |
| - # we update and install |
33 |
| - tlmgr update --list && |
34 |
| - tlmgr install {{ ' '.join(latex_packages) }} && |
35 |
| - echo {{ ' '.join(latex_packages) }} > $HOME/texmf/ansible-state |
36 |
| - when: installed_packages.content|b64decode|trim != latex_packages|join(" ") |
37 |
| - tags: |
38 |
| - - bootstrap |
| 12 | + vars: |
| 13 | + packages: "{{ template_dir }}/scripts/packages" |
| 14 | + shell: | |
| 15 | + packages=$(cat {{ packages }}) |
| 16 | + {{ texlive_binaries }}/tlmgr update --self |
| 17 | + {{ texlive_binaries }}/tlmgr install $packages |
| 18 | + args: |
| 19 | + executable: /bin/bash |
39 | 20 |
|
40 | 21 | - name: create tabu directory
|
| 22 | + become: true |
| 23 | + become_user: zds |
41 | 24 | file:
|
42 |
| - path: /opt/zds/texmf/tex/latex/tabu/ |
| 25 | + path: "{{ texlive_dir }}/texmf-dist/tex/latex/tabu/" |
43 | 26 | state: directory
|
44 |
| - tags: |
45 |
| - - bootstrap |
46 | 27 |
|
47 | 28 | - name: install tabu package
|
| 29 | + become: true |
| 30 | + become_user: zds |
48 | 31 | get_url:
|
49 | 32 | url: https://raw.githubusercontent.com/tabu-issues-for-future-maintainer/tabu/master/tabu.sty
|
50 |
| - dest: /opt/zds/texmf/tex/latex/tabu/tabu.sty |
51 |
| - tags: |
52 |
| - - bootstrap |
| 33 | + dest: "{{ texlive_dir }}/texmf-dist/tex/latex/tabu/tabu.sty" |
0 commit comments