fix: with_item to with_dict (#9729)

Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
This commit is contained in:
rongfu.leng
2023-01-31 19:18:50 +08:00
committed by GitHub
parent c0c2cd6e03
commit 0707c8ea6f
4 changed files with 39 additions and 16 deletions

View File

@@ -117,13 +117,12 @@
state: directory
mode: 0755
recurse: true
with_items: "{{ containerd_insecure_registries }}"
with_dict: "{{ containerd_insecure_registries }}"
when: containerd_insecure_registries is defined
- name: containerd Write hosts.toml file
blockinfile:
path: "{{ containerd_cfg_dir }}/certs.d/{{ item.key }}/hosts.toml"
owner: "root"
mode: 0640
create: true
block: |
@@ -131,7 +130,7 @@
[host."{{ item.value }}"]
capabilities = ["pull", "resolve", "push"]
skip_verify = true
with_items: "{{ containerd_insecure_registries }}"
with_dict: "{{ containerd_insecure_registries }}"
when: containerd_insecure_registries is defined
# you can sometimes end up in a state where everything is installed