-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed as not planned
Closed as not planned
Copy link
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Description
etc_hosts_localhosts_dict_target is a dictionary which is used in a loop, adding a sort will make it idempotent. It can now cause a rewite of /etc/hosts because dictionaries are unsorted. Running the cluster.yml playbook twice is a workaround.
- name: Hosts | Update (if necessary) hosts file
lineinfile:
dest: /etc/hosts
line: "{{ item.key }} {{ item.value | join(' ') }}"
regexp: "^{{ item.key }}.*$"
state: present
backup: "{{ leave_etc_backup_files }}"
unsafe_writes: true
loop: "{{ etc_hosts_localhosts_dict_target | default({}) | dict2items }}"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.