diff --git a/roles/luks_ssh/handlers/main.yml b/roles/luks_ssh/handlers/main.yml index 23caa0a..cfa42ef 100644 --- a/roles/luks_ssh/handlers/main.yml +++ b/roles/luks_ssh/handlers/main.yml @@ -21,13 +21,19 @@ - name: Regenerate grub config BIOS ansible.builtin.command: grub2-mkconfig -o /etc/grub2.cfg listen: Regenerate grub config + register: grub_output + changed_when: grub_output.rc != 0 become: true - name: Regenerate grub config EFI ansible.builtin.command: grub2-mkconfig -o /etc/grub2-efi.cfg listen: Regenerate grub config + register: grub_efi_output + changed_when: grub_efi_output.rc != 0 become: true - name: Regenerate dracut ansible.builtin.command: dracut -f + register: dracut_output + changed_when: dracut_output.rc != 0 become: true diff --git a/roles/moby_engine/handlers/main.yml b/roles/moby_engine/handlers/main.yml index ac9c623..26b3546 100644 --- a/roles/moby_engine/handlers/main.yml +++ b/roles/moby_engine/handlers/main.yml @@ -26,9 +26,13 @@ - name: Regenerate grub config BIOS ansible.builtin.command: grub2-mkconfig -o /etc/grub2.cfg listen: Regenerate grub config + register: grub_output + changed_when: grub_output.rc != 0 become: true - name: Regenerate grub config EFI ansible.builtin.command: grub2-mkconfig -o /etc/grub2-efi.cfg listen: Regenerate grub config + register: grub_efi_output + changed_when: grub_efi_output.rc != 0 become: true diff --git a/roles/ssh/handlers/main.yml b/roles/ssh/handlers/main.yml index 3e53c1d..19e9400 100644 --- a/roles/ssh/handlers/main.yml +++ b/roles/ssh/handlers/main.yml @@ -19,4 +19,6 @@ - name: Reload firewalld ansible.builtin.command: "firewall-cmd --reload" + register: firewalld_output + changed_when: firewalld_output.rc != 0 become: true diff --git a/roles/traefik/handlers/main.yml b/roles/traefik/handlers/main.yml index de66de6..ca285e8 100644 --- a/roles/traefik/handlers/main.yml +++ b/roles/traefik/handlers/main.yml @@ -21,4 +21,6 @@ ansible.builtin.command: "docker-compose restart tor" args: chdir: "{{ traefik_install_location }}" + register: compose_output + changed_when: compose_output.rc != 0 become: true