Merge "deploy-steps-playbooks-common: fix logic for scale_ignore_unreachable"

This commit is contained in:
Zuul 2020-07-17 05:30:54 +00:00 committed by Gerrit Code Review
commit b5170afff0
1 changed files with 11 additions and 6 deletions

View File

@ -6,7 +6,7 @@
- hosts: "{{ deploy_source_host }}" - hosts: "{{ deploy_source_host }}"
name: Gather facts from undercloud name: Gather facts from undercloud
gather_facts: yes gather_facts: yes
any_errors_fatal: "{{ not scale_ignore_unreachable | default(true) }}" any_errors_fatal: true
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}" ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
become: false become: false
tags: tags:
@ -15,7 +15,8 @@
- hosts: "{{ deploy_target_host }}" - hosts: "{{ deploy_target_host }}"
name: Gather facts from overcloud name: Gather facts from overcloud
gather_facts: yes gather_facts: yes
any_errors_fatal: "{{ not scale_ignore_unreachable | default(true) }}" # False because https://github.com/ansible/ansible/issues/70663
any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}" ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
tags: tags:
- facts - facts
@ -23,7 +24,7 @@
- hosts: all - hosts: all
name: Load global variables name: Load global variables
gather_facts: "{{ gather_facts | default(false) }}" gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ not scale_ignore_unreachable | default(true) }}" any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}" ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
tasks: tasks:
- include_vars: global_vars.yaml - include_vars: global_vars.yaml
@ -35,7 +36,8 @@
name: Ensure /var/lib/config-data context name: Ensure /var/lib/config-data context
become: true become: true
gather_facts: false gather_facts: false
any_errors_fatal: yes any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
tasks: tasks:
- name: Ensure /var/lib/config-data context - name: Ensure /var/lib/config-data context
shell: |- shell: |-
@ -56,7 +58,9 @@
- hosts: "{{ deploy_target_host }}" - hosts: "{{ deploy_target_host }}"
name: Render all_nodes data as group_vars for overcloud name: Render all_nodes data as group_vars for overcloud
gather_facts: "{{ gather_facts | default(false) }}" gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: yes # we don't skip errors or ignore unreachable on this one because it's
# delegated to localhost. localhost should never be unreachable (tm)
any_errors_fatal: True
tasks: tasks:
- name: Render all_nodes data as group_vars for overcloud - name: Render all_nodes data as group_vars for overcloud
delegate_to: localhost delegate_to: localhost
@ -71,7 +75,8 @@
- hosts: "{{ deploy_target_host }}" - hosts: "{{ deploy_target_host }}"
name: Set all_nodes data as group_vars for overcloud name: Set all_nodes data as group_vars for overcloud
gather_facts: "{{ gather_facts | default(false) }}" gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: yes any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
tasks: tasks:
- name: Set all_nodes data as group_vars for overcloud - name: Set all_nodes data as group_vars for overcloud
include_vars: "{{ playbook_dir }}/group_vars/overcloud.json" include_vars: "{{ playbook_dir }}/group_vars/overcloud.json"