File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 99 network_allocation_path : " {{ kayobe_env_config_path }}/network-allocation.yml"
1010 tasks :
1111 - name : Show baremetal node
12- ansible.builtin.shell :
12+ ansible.builtin.command :
1313 cmd : " openstack baremetal node show {{ inventory_hostname }} -f json"
1414 register : node_show
1515 failed_when : false
1616 changed_when : false
1717 delegate_to : localhost
1818
19- - block :
19+ - name : Update network allocations
20+ when : ' "HTTP 404" not in node_show.stderr'
21+ block :
2022 - name : Read network allocations
2123 ansible.builtin.set_fact :
2224 net_alc_yaml : " {{ admin_oc_net_ips }}"
3133 ansible.builtin.copy :
3234 content : " {{ new_net_alc | to_nice_yaml(indent=2) }}"
3335 dest : " {{ network_allocation_path }}"
34- when :
35- - ' "HTTP 404" not in node_show.stderr'
3636
3737- name : Deploy baremetal compute nodes as hypervisors
3838 hosts : compute
3939 gather_facts : false
4040 connection : local
4141 tasks :
4242 - name : Show baremetal node
43- ansible.builtin.shell :
43+ ansible.builtin.command :
4444 cmd : " openstack baremetal node show {{ inventory_hostname }} -f json"
4545 register : node_show
4646 failed_when : false
5353 failed_when : false
5454 changed_when : false
5555
56- - block :
57- - name : Create port
56+ - name : Deploy baremetal instance
57+ when :
58+ - ' "HTTP 404" not in node_show.stderr'
59+ - ' "available" in node_show_json.provision_state'
60+ block :
61+ - name : Configure network for baremetal instance
5862 openstack.cloud.port :
5963 state : present
6064 name : " {{ inventory_hostname }}"
8387 ironic_node : " {{ inventory_hostname }}"
8488 delegate_to : localhost
8589 register : server
86- when :
87- - ' "HTTP 404" not in node_show.stderr'
88- - ' "available" in node_show_json.provision_state'
You can’t perform that action at this time.
0 commit comments