Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 912fd7d5 authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

fix: post-install feat is skipped when var is undefined

parent caac0834
No related branches found
No related tags found
1 merge request!16Resolve "feat: add app post_install"
Pipeline #2985 failed
......@@ -33,14 +33,23 @@
owner: "{{ item.owner }}"
group: "{{ item.group }}"
mode: "{{ item.mode }}"
loop: "{{ ynh_app.post_install }}"
loop: "{{ ynh_app.post_install|default([]) }}"
when: ynh_app.post_install
- name: Execute script if file type is a script then remove it
ansible.builtin.shell:
"{{ pst_install.dest }} && rm -f {{ pst_install.dest }}"
ansible.builtin.command: "{{ ynh_app_post_install.dest }}"
args:
chdir: /tmp/
loop: "{{ ynh_app.post_install }}"
loop: "{{ ynh_app.post_install|default([]) }}"
loop_control:
loop_var: pst_install
when: pst_install.type == "script"
loop_var: ynh_app_post_install
when: ynh_app_post_install.type == "script"
- name: Remove script after execution
ansible.builtin.file:
path: "{{ ynh_app_post_install.dest }}"
state: absent
loop: "{{ ynh_app.post_install|default([]) }}"
loop_control:
loop_var: ynh_app_post_install
when: ynh_app_post_install.type == "script"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment