mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-17 03:00:07 -03:30
Replace deprecated 'with_dict' with 'loop' (#7442)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
- name: download | Download files / images
|
||||
include_tasks: "{{ include_file }}"
|
||||
with_dict: "{{ downloads | combine(kubeadm_images) }}"
|
||||
loop: "{{ downloads | combine(kubeadm_images) | dict2items }}"
|
||||
vars:
|
||||
download: "{{ download_defaults | combine(item.value) }}"
|
||||
include_file: "download_{% if download.container %}container{% else %}file{% endif %}.yml"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
etc_hosts_localhosts_dict_target: >-
|
||||
{%- set target_entries = (etc_hosts_localhosts_dict|default({})).get(item.key, []) | difference(item.value.get('unexpected' ,[])) -%}
|
||||
{{ etc_hosts_localhosts_dict_target|default({}) | combine({item.key: (target_entries + item.value.expected)|unique}) }}
|
||||
with_dict: "{{ etc_hosts_localhost_entries }}"
|
||||
loop: "{{ etc_hosts_localhost_entries|dict2items }}"
|
||||
|
||||
- name: Hosts | Update (if necessary) hosts file
|
||||
lineinfile:
|
||||
@@ -66,7 +66,7 @@
|
||||
state: present
|
||||
backup: yes
|
||||
unsafe_writes: yes
|
||||
with_dict: "{{ etc_hosts_localhosts_dict_target }}"
|
||||
loop: "{{ etc_hosts_localhosts_dict_target|dict2items }}"
|
||||
|
||||
# gather facts to update ansible_fqdn
|
||||
- name: Update facts
|
||||
|
||||
Reference in New Issue
Block a user