mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-22 05:30:51 -03:30
calico: fix NetworkManager check (#7169)
Previous check for presence of NM assumed "systemctl show NetworkManager" would exit with a nonzero status code, which seems not the case anymore with recent Flatcar Container Linux. This new check also checks the activeness of network manager, as `is-active` implies presence. Signed-off-by Jorik Jonker <jorik@kippendief.biz>
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
- name: Calico | Check if host has NetworkManager
|
- name: Calico | Check if host has NetworkManager
|
||||||
# noqa 303 Should we use service_facts for this?
|
# noqa 303 Should we use service_facts for this?
|
||||||
command: systemctl show NetworkManager
|
command: systemctl is-active --quiet NetworkManager.service
|
||||||
register: nm_check
|
register: nm_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|||||||
Reference in New Issue
Block a user