c12s-kubespray/roles/container-engine/crun/tasks/main.yml
Etienne Champetier f26cc9f75b 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
2021-03-15 07:07:05 -07:00

24 lines
502 B
YAML

---
- name: Create binary destination folder
file:
mode: '0755'
state: directory
path: "{{ crun_bin_dir }}"
- name: Check if binary exists
stat:
path: "{{ crun_bin_dir }}/crun"
get_attributes: no
get_checksum: no
get_mime: no
register: crun_stat
# TODO: use download_file.yml
- name: Download binary
get_url:
url: "{{ crun_release_url }}"
dest: "{{ crun_bin_dir }}/crun"
mode: '0755'
when: not crun_stat.stat.exists
environment: "{{ proxy_env }}"