Allow similar for IPMI hostnames

This commit is contained in:
Joshua Boniface 2023-11-28 16:09:01 -05:00
parent ce907ff26a
commit 2545a7b744
2 changed files with 3 additions and 5 deletions

View File

@ -311,9 +311,7 @@ def get_configuration_current(config_file):
"suicide_intervals": int(o_fencing["intervals"].get("suicide_interval", 0)), "suicide_intervals": int(o_fencing["intervals"].get("suicide_interval", 0)),
"successful_fence": o_fencing["actions"].get("successful_fence", None), "successful_fence": o_fencing["actions"].get("successful_fence", None),
"failed_fence": o_fencing["actions"].get("failed_fence", None), "failed_fence": o_fencing["actions"].get("failed_fence", None),
"ipmi_hostname": o_fencing["ipmi"]["hostname_format"].format( "ipmi_hostname": o_fencing["ipmi"]["hostname"].format(node_id=node_id),
node_id=node_id
),
"ipmi_username": o_fencing["ipmi"]["username"], "ipmi_username": o_fencing["ipmi"]["username"],
"ipmi_password": o_fencing["ipmi"]["password"], "ipmi_password": o_fencing["ipmi"]["password"],
} }

View File

@ -247,8 +247,8 @@ fencing:
# IPMI details # IPMI details
ipmi: ipmi:
# Hostname format, using a "{node_id}" entry # Hostname format; use a "{node_id}" entry for a template, or a literal hostname
hostname_format: "pvchv{node_id}-lom.mydomain.tld" hostname: "pvchv{node_id}-lom.mydomain.tld"
# IPMI username # IPMI username
username: admin username: admin