Add all members of a group to /etc/hosts
on all of the nodes.
Currently this role uses the hardcoded ansible group cluster_nodes
.
Each host needs to have a variable called 'external_ip' defined, that will be used for the entry in /etc/hosts
.
domain_name
: Specify the domain part of the FQDN. Default value istraining.b1-systems.de
.group_name
: Which group of nodes should be iterated over and added to/etc/hosts
? Default value iscluster_nodes
.ip_address_variable
: Which variables has the correct IP address. Default value isexternal_ip
.
None.
- hosts: servers
roles:
- role: 'johanneskastl.add_all_nodes_to_etc_hosts'
domain_name: 'example.org'
group_name: 'webservers'
BSD-3-Clause
I am Johannes Kastl, reachable via [email protected].