de1d9df787
By default Ansible stat module compute checksum, list extended attributes and find mime type To find all stat invocations that really use one of those: git grep -F stat. | grep -vE 'stat.(islnk|exists|lnk_source|writeable)' Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
28 lines
766 B
YAML
28 lines
766 B
YAML
---
|
|
- name: reset | check kube-dummy-if network device
|
|
stat:
|
|
path: /sys/class/net/kube-dummy-if
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_mime: no
|
|
register: kube_dummy_if
|
|
|
|
- name: reset | remove the network device created by kube-router
|
|
command: ip link del kube-dummy-if
|
|
when: kube_dummy_if.stat.exists
|
|
|
|
- name: check kube-bridge exists
|
|
stat:
|
|
path: /sys/class/net/kube-bridge
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_mime: no
|
|
register: kube_bridge_if
|
|
|
|
- name: reset | donw the network bridge create by kube-router
|
|
command: ip link set kube-bridge down
|
|
when: kube_bridge_if.stat.exists
|
|
|
|
- name: reset | remove the network bridge create by kube-router
|
|
command: ip link del kube-bridge
|
|
when: kube_bridge_if.stat.exists
|