Fix openshift playbook import

I4aa8055fe800723b3e140f8232c9e41e769e11f3 wrongly replaced 'include'
with 'include_tasks' in openshift and kubernetes templates and broke
their deployment, resulting in an ansible error:

  ERROR! 'include_tasks' is not a valid attribute for a Play

Use import_playbook instead.

Change-Id: I0bb9bfabeb06dc9d602ad173ce2d12d1771b6b1f
Closes-Bug: #1812983
This commit is contained in:
Martin André 2019-01-23 11:31:50 +01:00
parent a535dd6e9c
commit cb675a91a7
2 changed files with 7 additions and 7 deletions

View File

@ -153,7 +153,7 @@ outputs:
copy:
dest: "{{playbook_dir}}/kubespray/playbook.yml"
content: |
- include_tasks: {{ kubespray_dir|default('/usr/share/kubespray') }}/cluster.yml
- import_playbook: {{ kubespray_dir|default('/usr/share/kubespray') }}/cluster.yml
- name: set kubespray command
set_fact:
# NOTE: We could let kubespray configure docker

View File

@ -441,8 +441,8 @@ outputs:
{% if tripleo_stack_action == 'CREATE' %}
# Prerequisites playbook is explicitly needed only for
# initial install
- include_tasks: "{{openshift_prerequisites_playbook_path}}"
- include_tasks: "{{openshift_ansible_playbook_path}}"
- import_playbook: "{{openshift_prerequisites_playbook_path}}"
- import_playbook: "{{openshift_ansible_playbook_path}}"
{% elif tripleo_stack_action == 'UPDATE' %}
{% if has_new_nodes %}
@ -455,16 +455,16 @@ outputs:
state: restarted
{% if new_master_nodes | count > 0 %}
# Scale up nodes (including masters)
- include_tasks: "{{openshift_master_scaleup_playbook_path}}"
- import_playbook: "{{openshift_master_scaleup_playbook_path}}"
{% else %}
# Scale up workers/infra nodes
- include_tasks: "{{openshift_worker_scaleup_playbook_path}}"
- import_playbook: "{{openshift_worker_scaleup_playbook_path}}"
{% endif %}
{% endif %}
# Re-run the deploy playbook to apply potential change
# changes to existing nodes
- include_tasks: "{{openshift_ansible_playbook_path}}"
- import_playbook: "{{openshift_ansible_playbook_path}}"
- name: Restart masters
hosts: masters
serial: 1
@ -550,7 +550,7 @@ outputs:
dest: "{{playbook_dir}}/openshift/playbook.yml"
content: |
# Scale up etcd nodes
- include_tasks: "{{openshift_etcd_scaleup_playbook_path}}"
- import_playbook: "{{openshift_etcd_scaleup_playbook_path}}"
- name: print openshift command
debug: