Allow specifying alternate channels in IPMI

This commit is contained in:
Joshua Boniface 2023-02-23 10:54:05 -05:00
parent edc76114c6
commit 812d23ca7b
2 changed files with 7 additions and 4 deletions

View File

@ -60,18 +60,21 @@ ipmi:
address: 192.168.100.101
netmask: 255.255.255.0
gateway: 192.168.100.1
channel: 1 # Optional: defaults to "1" if not set
"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
channel: 1 # Optional: defaults to "1" if not set
"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
channel: 1 # Optional: defaults to "1" if not set
# IPMI user configuration
# > Adjust this based on the specific hardware you are using; the cluster_hardware variable is

View File

@ -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'][this_node]['address'] }}
pre-up ipmitool lan set 1 netmask {{ ipmi['hosts'][this_node]['netmask'] }}
pre-up ipmitool lan set 1 defgw ipaddr {{ ipmi['hosts'][this_node]['gateway'] }}
pre-up ipmitool lan set {{ ipmi['hosts'][this_node]['channel']|default("1") }} ipsrc static
pre-up ipmitool lan set {{ ipmi['hosts'][this_node]['channel']|default("1") }} ipaddr {{ ipmi['hosts'][this_node]['address'] }}
pre-up ipmitool lan set {{ ipmi['hosts'][this_node]['channel']|default("1") }} netmask {{ ipmi['hosts'][this_node]['netmask'] }}
pre-up ipmitool lan set {{ ipmi['hosts'][this_node]['channel']|default("1") }} defgw ipaddr {{ ipmi['hosts'][this_node]['gateway'] }}