Only use stat get_checksum: yes when needed (#7270)

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>
(cherry picked from commit de1d9df787)

Conflicts:
	roles/etcd/tasks/check_certs.yml
This commit is contained in:
Etienne Champetier
2021-02-10 08:36:59 -05:00
committed by Kubernetes Prow Robot
parent 5563ed8084
commit f26cc9f75b
29 changed files with 142 additions and 2 deletions

View File

@@ -2,6 +2,9 @@
- name: reset | check dummy0 network device
stat:
path: /sys/class/net/dummy0
get_attributes: no
get_checksum: no
get_mime: no
register: dummy0
- name: reset | remove the network device created by calico

View File

@@ -2,6 +2,9 @@
- name: "reset | check if network device {{ iface }} is present"
stat:
path: "/sys/class/net/{{ iface }}"
get_attributes: no
get_checksum: no
get_mime: no
register: device_remains
- name: "reset | remove network device {{ iface }}"

View File

@@ -2,6 +2,9 @@
- 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
@@ -11,6 +14,9 @@
- 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

View File

@@ -2,6 +2,9 @@
- 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
@@ -11,6 +14,9 @@
- 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