File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 88 vars :
99 network_allocation_path : " {{ kayobe_env_config_path }}/network-allocation.yml"
1010 tasks :
11- - name : Show baremetal node
12- ansible.builtin.command :
13- cmd : " openstack baremetal node show {{ inventory_hostname }} -f json"
14- register : node_show
15- failed_when : false
16- changed_when : false
17- delegate_to : localhost
18-
1911 - name : Update network allocations
20- when : ' "HTTP 404" not in node_show.stderr '
12+ when : stackhpc_populate_baremetal_network_allocations
2113 block :
14+ - name : Show baremetal node
15+ ansible.builtin.command :
16+ cmd : " openstack baremetal node show {{ inventory_hostname }} -f json"
17+ register : node_show
18+ failed_when : false
19+ changed_when : false
20+ delegate_to : localhost
21+
2222 - name : Write new network allocations
2323 vars :
2424 new_ips : " { '{{ admin_oc_net_name }}_ips': { '{{ inventory_hostname }}': '{{ ansible_host }}' } }"
2525 new_net_alc : " {{ admin_oc_net_ips | combine(new_ips, recursive=True) }}"
2626 ansible.builtin.copy :
2727 content : " {{ new_net_alc | to_nice_yaml(indent=2) }}"
2828 dest : " {{ network_allocation_path }}"
29+ when : ' "HTTP 404" not in node_show.stderr'
2930
3031- name : Deploy baremetal compute nodes as hypervisors
3132 hosts : compute
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ stackhpc_docker_registry_password: "{{ pulp_password }}"
175175# Whether or not to run CIS benchmark hardening playbooks. Default is false.
176176# stackhpc_enable_cis_benchmark_hardening_hook:
177177
178+ # Whether to auto populate the admin network allocations for baremetal hypervisors.
179+ # Default is true.
180+ stackhpc_populate_baremetal_network_allocations : true
181+
178182# ##############################################################################
179183# Octavia Amphora image
180184
You can’t perform that action at this time.
0 commit comments