X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Finfra-ansible.git;a=blobdiff_plain;f=playbooks%2Fbaremetal-install.yml;h=12c95bdce0a5b0a3f9da724000175fd478544af3;hp=26279d03b1917b81f457b6caa56d30ac35899ee9;hb=1aeb85260cd48e76577afdae4fa3851dedb7c3c5;hpb=ebead6e70289f4cabe7cc0784e45b4864022f0fb diff --git a/playbooks/baremetal-install.yml b/playbooks/baremetal-install.yml index 26279d0..12c95bd 100644 --- a/playbooks/baremetal-install.yml +++ b/playbooks/baremetal-install.yml @@ -26,7 +26,6 @@ - hosts|count > 1 - reinitialized_nodes is not defined or (inventory_hostname not in reinitialized_nodes) - - name: Make sure nfs server is toren down before we start hosts: baremetal-infra_hosts tasks: @@ -37,8 +36,11 @@ - name: NFS server setup hosts: baremetal-infra_hosts + vars_files: + - "/etc/ansible/roles/baremetal_provision/defaults/main.yml" tasks: - include: baremetal-setup-nfs-server.yaml + - include: baremetal_setup_http.yml when: hosts|count > 1 - name: Setup NFS mount points on other controllers where Ironic conductor is running @@ -52,12 +54,16 @@ - reinitialized_nodes is not defined or (inventory_hostname not in reinitialized_nodes) - name: Install baremetal nodes for this cloud infra - hosts: baremetal-infra_hosts - gather_facts: "{{ gather_facts | default(True) }}" + hosts: baremetal-nodes + gather_facts: False max_fail_percentage: 20 + # TODO: This is just to work around the unavailable ironic_service_adminurl variable + vars_files: + - /opt/openstack-ansible/inventory/group_vars/ironic_all.yml roles: - role: baremetal_provision when: hosts|count > 1 + delegate_to: localhost - name: Tear down NFS mount points on other controllers where Ironic conductor is running hosts: ironic_conductor @@ -72,5 +78,6 @@ hosts: baremetal-infra_hosts tasks: - include: baremetal-rm-nfs-server.yaml + - include: baremetal_teardown_http.yml when: - hosts|count > 1