Use inventory_hostname for IPMI dict
This commit is contained in:
parent
836c946c72
commit
8a140f70dc
|
@ -35,19 +35,19 @@ ipmi:
|
|||
username: "host"
|
||||
password: ""
|
||||
hosts:
|
||||
"pvchv1":
|
||||
"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.
|
||||
address: 192.168.100.101
|
||||
netmask: 255.255.255.0
|
||||
gateway: 192.168.100.1
|
||||
"pvchv2":
|
||||
"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.
|
||||
address: 192.168.100.102
|
||||
netmask: 255.255.255.0
|
||||
gateway: 192.168.100.1
|
||||
"pvchv3":
|
||||
"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.
|
||||
address: 192.168.100.103
|
||||
|
|
|
@ -93,7 +93,7 @@ pvc_nodes:
|
|||
upstream_ip: "192.168.100.11"
|
||||
cluster_ip: "10.0.0.1"
|
||||
storage_ip: "10.0.1.1"
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv1']['hostname'] }}" # Note the node hostname key in here
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv1']['hostname'] }}" # Note the node inventory hostname key in here
|
||||
ipmi_user: "{{ ipmi['users']['pvc']['username'] }}"
|
||||
ipmi_password: "{{ ipmi['users']['pvc']['password'] }}"
|
||||
- hostname: "pvchv2"
|
||||
|
@ -103,7 +103,7 @@ pvc_nodes:
|
|||
upstream_ip: "192.168.100.12"
|
||||
cluster_ip: "10.0.0.2"
|
||||
storage_ip: "10.0.1.2"
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv2']['hostname'] }}" # Note the node hostname key in here
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv2']['hostname'] }}" # Note the node inventory hostname key in here
|
||||
ipmi_user: "{{ ipmi['users']['pvc']['username'] }}"
|
||||
ipmi_password: "{{ ipmi['users']['pvc']['password'] }}"
|
||||
- hostname: "pvchv3"
|
||||
|
@ -113,7 +113,7 @@ pvc_nodes:
|
|||
upstream_ip: "192.168.100.13"
|
||||
cluster_ip: "10.0.0.3"
|
||||
storage_ip: "10.0.1.3"
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv3']['hostname'] }}" # Note the node hostname key in here
|
||||
ipmi_host: "{{ ipmi['hosts']['pvchv3']['hostname'] }}" # Note the node inventory hostname key in here
|
||||
ipmi_user: "{{ ipmi['users']['pvc']['username'] }}"
|
||||
ipmi_password: "{{ ipmi['users']['pvc']['password'] }}"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
iface ipmi inet manual
|
||||
pre-up ipmitool lan set 1 ipsrc static
|
||||
pre-up ipmitool lan set 1 ipaddr {{ ipmi['hosts'][ansible_hostname]['address'] }}
|
||||
pre-up ipmitool lan set 1 netmask {{ ipmi['hosts'][ansible_hostname]['netmask'] }}
|
||||
pre-up ipmitool lan set 1 defgw ipaddr {{ ipmi['hosts'][ansible_hostname]['gateway'] }}
|
||||
pre-up ipmitool lan set 1 ipaddr {{ ipmi['hosts'][inventory_hostname]['address'] }}
|
||||
pre-up ipmitool lan set 1 netmask {{ ipmi['hosts'][inventory_hostname]['netmask'] }}
|
||||
pre-up ipmitool lan set 1 defgw ipaddr {{ ipmi['hosts'][inventory_hostname]['gateway'] }}
|
||||
|
|
Loading…
Reference in New Issue