Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pause only when previous task reports changed status #3

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,35 @@
cmd: "/usr/local/sbin/configctl firmware remove {{ item }}"
removes: "/usr/local/opnsense/version/{{ item | split('-', 1) | last }}"
with_items: "{{ opn_plugins_remove }}"
register: opnsense_plugpack__register_remove_opnsense_plugins

- name: give the process some time for settling ...
ansible.builtin.pause:
seconds: "{{ opn_plugpack_sleep }}"
when: opnsense_plugpack__register_remove_opnsense_plugins.changed # noqa no-handler

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

- name: give the process some time for settling ...
ansible.builtin.pause:
seconds: "{{ opn_plugpack_sleep }}"
when: opnsense_plugpack__register_install_opnsense_plugins.changed # noqa no-handler

- name: purge opnsense pkg
community.general.pkgng:
name: "{{ opn_packages_remove }}"
state: absent
register: opnsense_plugpack__register_purge_opnsense_pkg

- name: give the process some time for settling ...
ansible.builtin.pause:
seconds: "{{ opn_plugpack_sleep }}"
when: opnsense_plugpack__register_purge_opnsense_pkg.changed # noqa no-handler

- name: install opnsense pkg
community.general.pkgng:
Expand Down