Files
configpolicy/roles/hostname/tasks/main.yml
Dustin C. Hatch 712d298b38 hostname: Also write /etc/hosts
This commit introduces a new role, *hostname*, that is used by the
`hostname.yml` playbook to set the hostname. It also writes
`/etc/hosts` using a template.
2018-04-08 10:11:43 -05:00

9 lines
179 B
YAML

- name: ensure hostname is set
hostname:
name={{ preferred_hostname }}
- name: ensure hosts file is populated
template:
src=hosts.j2
dest=/etc/hosts
mode=0644