This role manages the hostname.
- Ansible 1.9+
The variables that can be passed to this role and a brief description about them are as follows:
# Enable/Disable hostname tasks
hostname_enabled: true
# Default hostname
hostname_name: "{{ inventory_hostname }}"
-
Configure the hostname with the defaults:
--- # This playbook configures hostname - name: Configure hostname on all nodes hosts: all roles: - hostname
-
Configure a non-default hostname:
--- # This playbook configures hostname - name: Configure hostname on all nodes hosts: all roles: - { role: hostname, hostname_name: "psc-doc-ansible01.augustash.com" }
None.
MIT