Skip to content

Commit

Permalink
Merge pull request #5 from Rosa-Luxemburgstiftung-Berlin/issue4-fix-h…
Browse files Browse the repository at this point in the history
…andling-of-multiple-plugins

fix handling of multiple plugins
  • Loading branch information
zerwes authored Nov 14, 2024
2 parents e360640 + 6bb2fd6 commit 176cde5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ opn_packages: []
opn_packages_remove: []

# seconds to wait betwen tasks
opn_plugpack_sleep: 5
opn_plugpack_sleep: 1
...
9 changes: 7 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
---
- name: remove opnsense plugins
ansible.builtin.command:
cmd: "/usr/local/sbin/configctl firmware remove {{ item }}"
cmd: "/usr/local/opnsense/scripts/firmware/launcher.sh remove {{ item }}"
removes: "/usr/local/opnsense/version/{{ item | split('-', 1) | last }}"
with_items: "{{ opn_plugins_remove }}"
loop_control:
pause: "{{ opn_plugpack_sleep }}"
register: opnsense_plugpack__register_remove_opnsense_plugins

- name: give the process some time for settling ...
Expand All @@ -14,9 +16,11 @@

- name: install opnsense plugins
ansible.builtin.command:
cmd: "/usr/local/sbin/configctl firmware install {{ item }}"
cmd: "/usr/local/opnsense/scripts/firmware/launcher.sh install {{ item }}"
creates: "/usr/local/opnsense/version/{{ item | split('-', 1) | last }}"
with_items: "{{ opn_plugins | default([]) }}"
loop_control:
pause: "{{ opn_plugpack_sleep }}"
register: opnsense_plugpack__register_install_opnsense_plugins

- name: give the process some time for settling ...
Expand All @@ -39,4 +43,5 @@
community.general.pkgng:
name: "{{ opn_packages }}"
state: present

...

0 comments on commit 176cde5

Please sign in to comment.