Skip to content

Commit

Permalink
Remplace /opt/zds par {{ workdir }}
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemilink committed Mar 21, 2024
1 parent 4f38af9 commit 80aa37a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions roles/app/tasks/fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
become_user: "{{ appuser }}"
ansible.builtin.shell: >
if [ ! -e {{ appdir }}/.loaded_fixtures ]; then \
/opt/zds/wrapper loaddata {{ appdir }}/fixtures/*.yaml &&
/opt/zds/wrapper load_factory_data {{ appdir }}/fixtures/advanced/aide_tuto_media.yaml &&
/opt/zds/wrapper load_fixtures --size=low --all &&
{{ workdir }}/wrapper loaddata {{ appdir }}/fixtures/*.yaml &&
{{ workdir }}/wrapper load_factory_data {{ appdir }}/fixtures/advanced/aide_tuto_media.yaml &&
{{ workdir }}/wrapper load_fixtures --size=low --all &&
touch {{ appdir }}/.loaded_fixtures &&
/opt/zds/wrapper es_manager index_all; \
{{ workdir }}/wrapper es_manager index_all; \
fi
2 changes: 1 addition & 1 deletion roles/latex/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: run texhash # noqa no-changed-when
become: true
become_user: "{{ appuser }}"
ansible.builtin.shell: texhash $HOME/texmf
ansible.builtin.command: texhash {{ workdir }}/texmf

- name: refresh font-config cache # noqa no-changed-when
ansible.builtin.command: fc-cache -f
2 changes: 1 addition & 1 deletion roles/latex/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
become_user: "{{ appuser }}"
ansible.builtin.git:
repo: "https://github.com/zestedesavoir/latex-template/"
dest: /opt/zds/texmf/tex/generic/latex-template
dest: "{{ workdir }}/texmf/tex/generic/latex-template"
notify: run texhash
tags:
- bootstrap
Expand Down
12 changes: 6 additions & 6 deletions roles/latex/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
become_user: "{{ appuser }}"
ansible.builtin.command: tlmgr init-usertree
args:
creates: $HOME/texmf
creates: "{{ workdir }}/texmf"
tags:
- bootstrap

- name: create ansible state if non-existant
ansible.builtin.file:
path: /opt/zds/texmf/ansible-state
path: "{{ workdir }}/texmf/ansible-state"
state: touch
mode: u=rw,g=r,o=r
tags:
- bootstrap

- name: check ansible state
ansible.builtin.slurp:
src: /opt/zds/texmf/ansible-state
src: "{{ workdir }}/texmf/ansible-state"
register: installed_packages

- name: install packages # noqa risky-shell-pipe no-changed-when
Expand All @@ -33,7 +33,7 @@
# we update and install
tlmgr update --list &&
tlmgr install {{ ' '.join(latex_packages) }} &&
echo {{ ' '.join(latex_packages) }} > $HOME/texmf/ansible-state
echo {{ ' '.join(latex_packages) }} > {{ workdir }}/texmf/ansible-state
when: installed_packages.content|b64decode|trim != latex_packages|join(" ")
tags:
- bootstrap
Expand All @@ -42,7 +42,7 @@
become: true
become_user: "{{ appuser }}"
ansible.builtin.file:
path: /opt/zds/texmf/tex/latex/tabu/
path: "{{ workdir }}/texmf/tex/latex/tabu/"
state: directory
mode: u=rwx,g=r,o=r
tags:
Expand All @@ -53,7 +53,7 @@
become_user: "{{ appuser }}"
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/tabu-issues-for-future-maintainer/tabu/master/tabu.sty
dest: /opt/zds/texmf/tex/latex/tabu/tabu.sty
dest: "{{ workdir }}/texmf/tex/latex/tabu/tabu.sty"
mode: u=rw,g=r,o=r
tags:
- bootstrap

0 comments on commit 80aa37a

Please sign in to comment.