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.
9 lines
179 B
YAML
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
|