diff options
Diffstat (limited to 'lib/ansible/playbooks')
-rw-r--r-- | lib/ansible/playbooks/configure_undercloud.yml | 22 | ||||
-rw-r--r-- | lib/ansible/playbooks/deploy_dependencies.yml | 19 | ||||
-rw-r--r-- | lib/ansible/playbooks/deploy_overcloud.yml | 18 | ||||
-rw-r--r-- | lib/ansible/playbooks/post_deploy_undercloud.yml | 1 |
4 files changed, 43 insertions, 17 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index bd06c0fa..c0e1cd35 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -45,12 +45,24 @@ - lineinfile: path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py regexp: '_link_ip_address_pxe_configs' - line: '_link_mac_pxe_configs(task)' + line: ' _link_mac_pxe_configs(task)' when: aarch64 - - name: undercloud install - shell: openstack undercloud install &> apex-undercloud-install.log - become: yes - become_user: stack + - block: + - name: undercloud install + shell: openstack undercloud install &> apex-undercloud-install.log + become: yes + become_user: stack + rescue: + - name: undercloud install retry + shell: openstack undercloud install >> apex-undercloud-install.log 2>&1 + become: yes + become_user: stack + always: + - name: fetch undercloud log + fetch: + src: /home/stack/apex-undercloud-install.log + dest: "{{ apex_temp_dir }}/" + flat: yes - name: openstack-configs nova shell: openstack-config --set /etc/nova/nova.conf DEFAULT {{ item }} become: yes diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml index 6db94ab4..8a575216 100644 --- a/lib/ansible/playbooks/deploy_dependencies.yml +++ b/lib/ansible/playbooks/deploy_dependencies.yml @@ -1,6 +1,12 @@ --- - hosts: localhost tasks: + - yum: + name: "{{ item }}" + state: present + with_items: + - python-lxml + - libvirt-python - sysctl: name: net.ipv4.ip_forward state: present @@ -30,21 +36,24 @@ state: present with_items: '{{ virsh_enabled_networks }}' - virt_net: - command: define + state: present name: '{{ item }}' xml: '{{ lookup("template", "virsh_network_ovs.xml.j2") }}' - autostart: yes with_items: '{{ virsh_enabled_networks }}' - virt_net: - command: create + state: active name: '{{ item }}' + autostart: yes with_items: '{{ virsh_enabled_networks }}' - virt_pool: name: default - command: define autostart: yes - state: active + state: present xml: '{{ lookup("template", "virsh_pool.xml.j2") }}' + - virt_pool: + name: default + autostart: yes + state: active - lineinfile: path: /etc/modprobe.d/kvm_intel.conf line: 'options kvm-intel nested=1' diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml index 3313bc87..19e46380 100644 --- a/lib/ansible/playbooks/deploy_overcloud.yml +++ b/lib/ansible/playbooks/deploy_overcloud.yml @@ -32,11 +32,13 @@ become: yes become_user: stack - name: Import inventory (baremetal) - shell: "{{ stackrc }} && {{ item }}" - with_items: - - openstack overcloud node import instackenv.json - - openstack overcloud node introspect --all-manageable --provide + shell: "{{ stackrc }} && openstack overcloud node import instackenv.json" when: not virtual + - name: Introspect inventory (baremetal) + shell: "{{ stackrc }} && openstack overcloud node introspect --all-manageable --provide" + when: + - not virtual + - not aarch64 - name: Import inventory (virtual) shell: "{{ stackrc }} && openstack overcloud node import --provide instackenv.json" when: virtual @@ -48,8 +50,12 @@ - compute - name: Configure DNS server for ctlplane network shell: "{{ stackrc }} && openstack subnet set ctlplane-subnet {{ dns_server_args }}" - - name: Execute Overcloud Deployment - shell: "{{ stackrc }} && bash deploy_command" + - block: + - name: Execute Overcloud Deployment + shell: "{{ stackrc }} && bash deploy_command" + rescue: + - name: Show overcloud failures + shell: "{{ stackrc }} && openstack stack failures list overcloud --long" - name: Show Keystone output shell: "{{ overcloudrc }} && {{ item }}" when: debug diff --git a/lib/ansible/playbooks/post_deploy_undercloud.yml b/lib/ansible/playbooks/post_deploy_undercloud.yml index ba0746b2..d6b8805a 100644 --- a/lib/ansible/playbooks/post_deploy_undercloud.yml +++ b/lib/ansible/playbooks/post_deploy_undercloud.yml @@ -115,4 +115,3 @@ become_user: stack when: congress with_items: "{{ congress_datasources }}" - ignore_errors: yes |