Unify and standardize inventory_hostname
This was causing some confusing conflicts, so create a new fact called "this_node" which is inventory_hostname.split('.')[0], i.e. the short name, and use that everywhere instead of an FQDN or true inventory hostname.
This commit is contained in:
@ -54,21 +54,21 @@ ipmi:
|
||||
username: "host"
|
||||
password: ""
|
||||
hosts:
|
||||
"pvchv1": # Use the inventory hostname here
|
||||
hostname: pvchv1-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be
|
||||
# used here; PVC connects to this *hostname* for fencing.
|
||||
"pvchv1": # This name MUST match the Ansible inventory_hostname's first portion, i.e. "inventory_hostname.split('.')[0]"
|
||||
hostname: pvchv1-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be used here and it must resolve to address.
|
||||
# PVC connects to this *hostname* for fencing.
|
||||
address: 192.168.100.101
|
||||
netmask: 255.255.255.0
|
||||
gateway: 192.168.100.1
|
||||
"pvchv2": # Use the inventory hostname here
|
||||
hostname: pvchv2-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be
|
||||
# used here; PVC connects to this *hostname* for fencing.
|
||||
"pvchv2": # This name MUST match the Ansible inventory_hostname's first portion, i.e. "inventory_hostname.split('.')[0]"
|
||||
hostname: pvchv2-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be used here and it must resolve to address.
|
||||
# PVC connects to this *hostname* for fencing.
|
||||
address: 192.168.100.102
|
||||
netmask: 255.255.255.0
|
||||
gateway: 192.168.100.1
|
||||
"pvchv3": # Use the inventory hostname here
|
||||
hostname: pvchv3-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be
|
||||
# used here; PVC connects to this *hostname* for fencing.
|
||||
"pvchv3": # This name MUST match the Ansible inventory_hostname's first portion, i.e. "inventory_hostname.split('.')[0]"
|
||||
hostname: pvchv3-lom # A valid short name (e.g. from /etc/hosts) or an FQDN must be used here and it must resolve to address.
|
||||
# PVC connects to this *hostname* for fencing.
|
||||
address: 192.168.100.103
|
||||
netmask: 255.255.255.0
|
||||
gateway: 192.168.100.1
|
||||
|
Reference in New Issue
Block a user