We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d670384 commit 6e300e5Copy full SHA for 6e300e5
1 file changed
roles/container-engine/containerd/tasks/main.yml
@@ -71,6 +71,13 @@
71
owner: "root"
72
mode: "0640"
73
notify: Restart containerd
74
+ vars:
75
+ ansible_stat: "{{ lookup('ansible.builtin.stat', containerd_cfg_dir + '/config.toml') }}"
76
+ when:
77
+ # Don't run during simulation/dry-run mode
78
+ - not ansible_check_mode
79
+ # AND either the config file is missing OR this host is marked for forced updates
80
+ - not ansible_stat.stat.exists or inventory_hostname in force_write_containerd_config
81
82
- name: Containerd | Configure containerd registries
83
block:
0 commit comments