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>
24 lines
575 B
YAML
24 lines
575 B
YAML
---
|
|
- name: reset | check cni network device
|
|
stat:
|
|
path: /sys/class/net/cni0
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_mime: no
|
|
register: cni
|
|
|
|
- name: reset | remove the network device created by the flannel
|
|
command: ip link del cni0
|
|
when: cni.stat.exists
|
|
|
|
- name: reset | check flannel network device
|
|
stat:
|
|
path: /sys/class/net/flannel.1
|
|
get_attributes: no
|
|
get_checksum: no
|
|
get_mime: no
|
|
register: flannel
|
|
|
|
- name: reset | remove the network device created by the flannel
|
|
command: ip link del flannel.1
|
|
when: flannel.stat.exists
|