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 caac0834 authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

feat: remove script after execution

parent 5bc931df
No related branches found
No related tags found
1 merge request!16Resolve "feat: add app post_install"
Pipeline #2983 failed
...@@ -35,8 +35,9 @@ ...@@ -35,8 +35,9 @@
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
loop: "{{ ynh_app.post_install }}" loop: "{{ ynh_app.post_install }}"
- name: Execute script if file type is a script - name: Execute script if file type is a script then remove it
ansible.builtin.command: "{{ pst_install.dest }}" ansible.builtin.shell:
"{{ pst_install.dest }} && rm -f {{ pst_install.dest }}"
args: args:
chdir: /tmp/ chdir: /tmp/
loop: "{{ ynh_app.post_install }}" loop: "{{ ynh_app.post_install }}"
......
...@@ -22,11 +22,9 @@ ...@@ -22,11 +22,9 @@
ansible.builtin.command: yunohost app map --output-as json ansible.builtin.command: yunohost app map --output-as json
register: ynh_installed_apps_raw register: ynh_installed_apps_raw
changed_when: False changed_when: False
tags: apps
- name: Format json of apps - name: Format json of apps
ansible.builtin.set_fact: ynh_installed_apps="{{ ynh_installed_apps_raw.stdout | from_json }}" ansible.builtin.set_fact: ynh_installed_apps="{{ ynh_installed_apps_raw.stdout | from_json }}"
tags: apps
- name: Install yunohost apps and perform post-install - name: Install yunohost apps and perform post-install
ansible.builtin.include_tasks: app.yml ansible.builtin.include_tasks: app.yml
...@@ -34,4 +32,3 @@ ...@@ -34,4 +32,3 @@
loop_control: loop_control:
loop_var: ynh_app loop_var: ynh_app
when: ynh_app.label not in ynh_installed_apps.values() when: ynh_app.label not in ynh_installed_apps.values()
tags: apps
...@@ -72,5 +72,3 @@ ...@@ -72,5 +72,3 @@
- name: Install Yunohost apps - name: Install Yunohost apps
ansible.builtin.include_tasks: apps.yml ansible.builtin.include_tasks: apps.yml
when: ynh_apps when: ynh_apps
tags: apps
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