5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 - include: convert_qcow_raw.yml
20 - name: Convert baremetal_nodes.j2 Jinja2 template to json file
22 src: 'baremetal_nodes.j2'
23 dest: '/tmp/baremetal_nodes.json'
25 - name: Include variables from baremetal_nodes.json
26 include_vars: '/tmp/baremetal_nodes.json'
28 - name: Remove /tmp/baremetal_nodes.json
30 path: "/tmp/baremetal_nodes.json"
33 - name: Restore baremetal_ironic_nodes variable with ironic_nodes variable
35 baremetal_ironic_nodes: "{{ironic_nodes}}"
36 when: baremetal_ironic_nodes is undefined
38 - name: Create vbmc ports for virtual hosts
39 include: vbmc_port_setup.yml
43 net_conn_details: "{{net_conn_details + [{'node_name': item.name, 'node_ip': item.driver_info.power.os_net_config | json_query('network_config[*].addresses[0].ip_netmask') | ipaddr('address')}] }}"
44 with_items: "{{ baremetal_ironic_nodes }}"
45 when: item.driver_info.power.os_net_config.network_config[0].type != 'ovs_bridge'
49 net_conn_details: "{{net_conn_details + [{'node_name': item.name, 'node_ip': item.driver_info.power.os_net_config | json_query('network_config[*].members[*].addresses[0].ip_netmask')|first | ipaddr('address')}] }}"
50 with_items: "{{ baremetal_ironic_nodes }}"
51 when: item.driver_info.power.os_net_config.network_config[0].type == 'ovs_bridge'
54 - include: setup_http.yml
62 - include: ironic_nodes_create.yml
64 - baremetal-ironic-nodes-create
66 - include: start_console_logging.yml
68 - baremetal-ironic-nodes-deploy
69 when: virtual_env == false
71 - include: ironic_nodes_deploy.yml
73 - baremetal-ironic-nodes-deploy
75 - include: stop_console_logging.yml
77 - baremetal-ironic-nodes-deploy
78 when: virtual_env == false
80 - include: teardown_http.yml