From 34d88ea6d9d41cef03bbd2339ba53c1a71dcdfcd Mon Sep 17 00:00:00 2001 From: Maxime Guyot Date: Mon, 31 Aug 2020 12:30:20 +0200 Subject: [PATCH] Fix Ansible-lint E303 (#6409) --- roles/kubernetes/preinstall/handlers/main.yml | 6 ++++-- roles/kubernetes/preinstall/tasks/0040-set_facts.yml | 3 ++- roles/network_plugin/calico/tasks/install.yml | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/kubernetes/preinstall/handlers/main.yml b/roles/kubernetes/preinstall/handlers/main.yml index 53013ffce..f9c4c6c23 100644 --- a/roles/kubernetes/preinstall/handlers/main.yml +++ b/roles/kubernetes/preinstall/handlers/main.yml @@ -29,8 +29,10 @@ - Preinstall | reload kubelet when: is_fedora_coreos -- name: Preinstall | reload NetworkManager # noqa 303 - command: systemctl restart NetworkManager.service +- name: Preinstall | reload NetworkManager + service: + name: NetworkManager.service + state: restarted when: is_fedora_coreos - name: Preinstall | reload kubelet diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml index 5fe9b5044..a8133a5db 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml @@ -31,7 +31,8 @@ changed_when: false check_mode: no -- name: check systemd-resolved # noqa 303 +- name: check systemd-resolved + # noqa 303 Should we use service_facts for this? command: systemctl is-active systemd-resolved register: systemd_resolved_enabled failed_when: false diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index 85a77f7e3..716833671 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -6,7 +6,8 @@ mode: 0755 remote_src: yes -- name: Calico | Check if host has NetworkManager # noqa 303 +- name: Calico | Check if host has NetworkManager + # noqa 303 Should we use service_facts for this? command: systemctl show NetworkManager register: nm_check failed_when: false