Merge "Fix update tasks for openshift"

This commit is contained in:
Zuul 2018-10-16 19:11:03 +00:00 committed by Gerrit Code Review
commit 6c61f874f8
2 changed files with 6 additions and 3 deletions

View File

@ -363,11 +363,11 @@ outputs:
- include: "{{openshift_prerequisites_playbook_path}}"
{% if tripleo_stack_action == 'UPDATE' and new_masters | count > 0 %}
{% if tripleo_stack_action == 'UPDATE' and new_master_nodes | count > 0 %}
- include: "{{openshift_master_scaleup_playbook_path}}"
{% endif %}
{% if tripleo_stack_action == 'UPDATE' and new_nodes | count > 0 %}
{% if tripleo_stack_action == 'UPDATE' and has_new_nodes %}
- include: "{{openshift_worker_scaleup_playbook_path}}"
{% endif %}
@ -375,7 +375,7 @@ outputs:
- include: "{{openshift_upgrade_playbook_path}}"
{% endif %}
{% if tripleo_stack_action == 'CREATE' or (tripleo_stack_action == 'UPDATE' and (new_masters + new_nodes) | count == 0) %}
{% if tripleo_stack_action == 'CREATE' or (tripleo_stack_action == 'UPDATE' and has_new_nodes) %}
- include: "{{openshift_ansible_playbook_path}}"
{% endif %}

View File

@ -112,6 +112,9 @@ outputs:
role_nodes: "{{all_role_nodes.results | map(attribute='ansible_facts') | map(attribute='nodes') | flatten | list}}"
new_role_nodes: "{{all_role_nodes.results | map(attribute='ansible_facts') | map(attribute='nodes') | flatten | selectattr('new_node', 'equalto', True) | list}}"
- set_fact:
has_new_nodes: "{{ (has_new_nodes | default(False)) or new_role_nodes | count > 0 }}"
- name: generate openshift inventory for {{tripleo_role_name}} role nodes
copy:
dest: "{{playbook_dir}}/openshift/inventory/{{tripleo_role_name}}_nodes.yml"