@@ -41,15 +41,19 @@ bmc_password={{ bmc_password }}
41
41
# one at a time by rerunning the SNO deploy playbook after changing which inventory line
42
42
# is uncommented
43
43
{% for sno in ocpinventory_sno_nodes %}
44
- {% set sno_long_hostname =sno .pm_addr | replace ('mgmt-' ,'' ) %}
45
- {% set sno_short_hostname =(sno_long_hostname .split ('.' )[0]) %}
46
- {% set lab_mac =(sno_foreman_data .results |selectattr ('json.name' , 'eq' , sno_long_hostname )|first ) | json_query (mac_query ) | join (', ' ) %}
47
- {% if sno_use_lab_dhcp %}
48
- {% set ip =(sno_foreman_data .results |selectattr ('json.name' , 'eq' , sno_long_hostname )|first ).json .ip %}
49
- {% else %}
50
- {% set ip =controlplane_network | ansible .utils .nthhost (loop .index 0 + 5) %}
51
- {% endif %}
52
- {% if not loop .first %} # {% endif %} {{ sno_short_hostname }} bmc_address={{ sno.pm_addr }} mac_address={{ sno.mac[controlplane_network_interface_idx] }} lab_mac={{ lab_mac }} ip={{ ip }} vendor={{ hw_vendor[(sno.pm_addr.split('.')[0] ).split('-')[-1]] }} install_disk={{ sno_install_disk }} boot_iso={{ sno_short_hostname }}.iso
44
+ {% set sno_long_hostname =sno .pm_addr | replace ('mgmt-' ,'' ) %}
45
+ {% if public_vlan and loop .first %}
46
+ {% set sno_short_hostname =cluster_name %}
47
+ {% else %}
48
+ {% set sno_short_hostname =(sno_long_hostname .split ('.' )[0]) %}
49
+ {% endif %}
50
+ {% set lab_mac =(sno_foreman_data .results |selectattr ('json.name' , 'eq' , sno_long_hostname )|first ) | json_query (mac_query ) | join (', ' ) %}
51
+ {% if sno_use_lab_dhcp %}
52
+ {% set ip =(sno_foreman_data .results |selectattr ('json.name' , 'eq' , sno_long_hostname )|first ).json .ip %}
53
+ {% else %}
54
+ {% set ip =controlplane_network | ansible .utils .nthhost (loop .index 0 + 3) %}
55
+ {% endif %}
56
+ {% if not loop .first %} # {% endif %} {{ sno_short_hostname }} bmc_address={{ sno.pm_addr }} mac_address={{ sno.mac[controlplane_network_interface_idx|int] }} lab_mac={{ lab_mac }} ip={{ ip }} vendor={{ hw_vendor[(sno.pm_addr.split('.')[0] ).split('-')[-1]] }} install_disk={{ sno_install_disk }} boot_iso={{ sno_short_hostname }}.iso
53
57
{% endfor %}
54
58
55
59
[sno:vars]
0 commit comments