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
This commit is contained in:
parent
ff36d44af5
commit
8a818ab226
|
@ -437,17 +437,6 @@ outputs:
|
||||||
- import_playbook: "{{openshift_worker_scaleup_playbook_path}}"
|
- import_playbook: "{{openshift_worker_scaleup_playbook_path}}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# 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
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
- name: set openshift command
|
- name: set openshift command
|
||||||
|
@ -553,6 +542,31 @@ outputs:
|
||||||
{{openshift_master_node_vars | to_nice_yaml() | indent(6)}}
|
{{openshift_master_node_vars | to_nice_yaml() | indent(6)}}
|
||||||
{% endif %}
|
{% 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
|
- name: generate openshift validation playbook
|
||||||
copy:
|
copy:
|
||||||
dest: "{{playbook_dir}}/openshift/playbook.yml"
|
dest: "{{playbook_dir}}/openshift/playbook.yml"
|
||||||
|
|
Loading…
Reference in New Issue