From fb2d92cd1711655896918cb0b83e09146d9affc7 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Thu, 14 Nov 2024 07:51:19 +0100 Subject: [PATCH 1/2] issue #4 - call firmware/launcher.sh script direct instead via configctl firmware (script is runs in foreground) --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index f0904e3..c3122bd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,7 +2,7 @@ --- - 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 }}" @@ -12,7 +12,7 @@ - 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([]) }}" From 61903a6f54e6d1dd0ce74ede33cf6698d4ca2667 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Thu, 14 Nov 2024 08:00:42 +0100 Subject: [PATCH 2/2] issue #4 - improve pause between tasks --- defaults/main.yml | 2 +- tasks/main.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 98da11f..d450f3f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,5 +21,5 @@ opn_packages: [] opn_packages_remove: [] # seconds to wait betwen tasks -opn_plugpack_sleep: 5 +opn_plugpack_sleep: 1 ... diff --git a/tasks/main.yml b/tasks/main.yml index c3122bd..db41b53 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,6 +5,8 @@ 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 }}" - name: give the process some time for settling ... ansible.builtin.pause: @@ -15,6 +17,8 @@ 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 }}" - name: give the process some time for settling ... ansible.builtin.pause: @@ -33,4 +37,5 @@ community.general.pkgng: name: "{{ opn_packages }}" state: present + ...