You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/lib/ansible_test/_data/playbooks/posix_hosts_restore.yml

11 lines
272 B
YAML

- name: Restore POSIX hosts file
hosts: all
gather_facts: no
tasks:
- name: Remove container hostname(s) from hosts file
blockinfile:
path: /etc/hosts
block: "{{ '\n'.join(hosts_entries) }}"
unsafe_writes: yes
state: absent