Apply changes to cluster using updated inventory
It could cause issue when being on inventory containing nodes marked as
new.
Specifically, it caused an undefined ansible variable error when
re-running the deploy playbook on an inventory that contained nodes in
the new_masters group.
Closes-Bug: #1812962
Change-Id: Iaf9403b5f60f06769d94317d261de8cad94274ab
(cherry picked from commit 8a818ab226
)
This commit is contained in:
parent
3ce479fb17
commit
1dfc4267f7
|
@ -437,17 +437,6 @@ outputs:
|
|||
- include: "{{openshift_worker_scaleup_playbook_path}}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
# Re-run the deploy playbook to apply potential change
|
||||
# changes to existing nodes
|
||||
- include: "{{openshift_ansible_playbook_path}}"
|
||||
- name: Restart masters
|
||||
hosts: masters
|
||||
serial: 1
|
||||
tasks:
|
||||
- import_role:
|
||||
name: /usr/share/ansible/openshift-ansible/roles/openshift_control_plane
|
||||
tasks_from: restart.yml
|
||||
{% endif %}
|
||||
|
||||
- name: set openshift command
|
||||
|
@ -553,6 +542,31 @@ outputs:
|
|||
{{openshift_master_node_vars | to_nice_yaml() | indent(6)}}
|
||||
{% endif %}
|
||||
|
||||
- when: tripleo_stack_action == 'UPDATE'
|
||||
block:
|
||||
- name: generate openshift playbook
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/openshift/playbook.yml"
|
||||
content: |
|
||||
# Re-run the deploy playbook to apply potential change
|
||||
# changes to existing nodes
|
||||
- import_playbook: "{{openshift_ansible_playbook_path}}"
|
||||
- name: Restart masters
|
||||
hosts: masters
|
||||
serial: 1
|
||||
tasks:
|
||||
- import_role:
|
||||
name: /usr/share/ansible/openshift-ansible/roles/openshift_control_plane
|
||||
tasks_from: restart.yml
|
||||
|
||||
- name: print openshift command
|
||||
debug:
|
||||
var: openshift_command
|
||||
- name: run openshift (immediate log at {{playbook_dir}}/openshift/playbook.log)
|
||||
shell: |
|
||||
{{openshift_command}} 2>&1 | tee {{playbook_dir}}/openshift/playbook.log
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
||||
- name: generate openshift validation playbook
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/openshift/playbook.yml"
|
||||
|
|
Loading…
Reference in New Issue