ansible/tasks/debian-general/hosts-file.yml

9 lines
280 B
YAML

---
- name: Ensure the hosts file is properly configured
ansible.builtin.copy:
dest: /etc/hosts
content: |
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
{{ PUBLIC_IP }} {{ HOSTNAME }} {{ HOSTNAME_SHORT }}