From a5d22b014b4ffd41cacdccd98c2fa932dfdb5ab3 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 11 Oct 2022 09:48:18 +0200 Subject: [PATCH] fix linting --- handlers/main.yml | 5 ++++- vars/default.yml | 2 +- vars/redhat-9.yml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 7fa54d2..4df4bac 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -6,9 +6,12 @@ poll: 0 when: not require_reboot | bool listen: __network_restart + tags: + - skip_ansible_later - name: Reboot server - shell: sleep 2 && shutdown -r now "Reboot triggered by Ansible" + reboot: + msg: "Reboot triggered by Ansible" async: 1 poll: 0 ignore_errors: yes diff --git a/vars/default.yml b/vars/default.yml index cd9eb38..bb84a2f 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -1,2 +1,2 @@ --- -__network_restart_command: sleep 2 && systemctl restart network +__network_restart_command: systemctl restart network diff --git a/vars/redhat-9.yml b/vars/redhat-9.yml index d41c09f..ef597dc 100644 --- a/vars/redhat-9.yml +++ b/vars/redhat-9.yml @@ -1,6 +1,6 @@ --- __network_restart_command: |- - nmcli connection reload && + nmcli connection reload {%- for file in __network_ifcfg | json_query('results[?changed==`true`].dest') %} - nmcli conn up {{ file }} + && nmcli conn up {{ file }} {%- endfor %}