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.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: ensure hostname is set
|
||||
hostname:
|
||||
name={{ preferred_hostname|d(inventory_hostname) }}
|
||||
roles:
|
||||
- hostname
|
||||
|
||||
Reference in New Issue
Block a user