1 # cmframework.requires: enable_provisioning_in_iptables.yml,hasdisablerecovery.yml,remove_node_from_barematel.yml
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
19 - name: Make sure to remove leftover NFS mount points on other controllers where Ironic conductor is running
20 hosts: ironic_conductor
23 - include: baremetal-rm-nfs-mnt.yaml
25 - installation_phase != "provisioning-started"
27 - reinitialized_nodes is not defined or (inventory_hostname not in reinitialized_nodes)
29 - name: Make sure nfs server is toren down before we start
30 hosts: baremetal-infra_hosts
32 - include: baremetal-rm-nfs-server.yaml
35 - reinitialized_nodes is not defined or (inventory_hostname not in reinitialized_nodes)
37 - name: NFS server setup
38 hosts: baremetal-infra_hosts
40 - "/etc/ansible/roles/baremetal_provision/defaults/main.yml"
42 - include: baremetal-setup-nfs-server.yaml
43 - include: baremetal_setup_http.yml
46 - name: Setup NFS mount points on other controllers where Ironic conductor is running
47 hosts: ironic_conductor
50 - include: baremetal-setup-nfs-mnt.yaml
52 - installation_phase != "provisioning-started"
54 - reinitialized_nodes is not defined or (inventory_hostname not in reinitialized_nodes)
56 - name: Install baremetal nodes for this cloud infra
57 hosts: baremetal-nodes
59 max_fail_percentage: 20
60 # TODO: This is just to work around the unavailable ironic_service_adminurl variable
62 - /opt/openstack-ansible/inventory/group_vars/ironic_all.yml
64 - role: baremetal_provision
66 delegate_to: localhost
68 - name: Tear down NFS mount points on other controllers where Ironic conductor is running
69 hosts: ironic_conductor
72 - include: baremetal-rm-nfs-mnt.yaml
74 - installation_phase != "provisioning-started"
77 - name: NFS server tear down
78 hosts: baremetal-infra_hosts
80 - include: baremetal-rm-nfs-server.yaml
81 - include: baremetal_teardown_http.yml