use include_tasks and import_playbook instead of include

include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: Ia1b826ca08ae042eec80f8c495ab030a087d97ba
This commit is contained in:
zhulingjie 2018-10-11 14:15:55 -04:00 committed by Mark Goddard
parent bf3d31aaa2
commit 8be12b71d7
27 changed files with 55 additions and 47 deletions

View File

@ -1,5 +1,5 @@
---
- include: dell-compute-node-inventory.yml
- import_playbook: dell-compute-node-inventory.yml
- name: Ensure baremetal compute nodes are PXE booted
hosts: baremetal-compute

View File

@ -2,7 +2,7 @@
# Set the boot mode (BIOS, UEFI) of Dell baremetal compute nodes.
# Add Dell baremetal compute nodes to the Ansible inventory.
- include: dell-compute-node-inventory.yml
- import_playbook: dell-compute-node-inventory.yml
- name: Ensure Dell baremetal compute nodes boot mode is set
hosts: baremetal-compute

View File

@ -2,7 +2,7 @@
# Configure the Dell baremetal compute nodes to PXE boot.
# Add Dell baremetal compute nodes to the Ansible inventory.
- include: dell-compute-node-inventory.yml
- import_playbook: dell-compute-node-inventory.yml
- name: Ensure Dell baremetal compute nodes are PXE booted
hosts: baremetal-compute

View File

@ -142,7 +142,7 @@
# Iterate over each switch port with an iDRAC attached in turn.
- name: Ensure iDRACs are (sequentially) bootstrapped
include: idrac-bootstrap-one.yml
include_tasks: idrac-bootstrap-one.yml
vars:
dell_switch_type: "{{ switch_type }}"
dell_switch_provider: "{{ switch_dellos_provider }}"

View File

@ -7,8 +7,8 @@
# Variables:
# action: One of deploy, destroy, pull, reconfigure, upgrade
- include: docker-registry.yml
- include: inspection-store.yml
- include: opensm.yml
- include: node-exporter.yml
- include: cadvisor.yml
- import_playbook: docker-registry.yml
- import_playbook: inspection-store.yml
- import_playbook: opensm.yml
- import_playbook: node-exporter.yml
- import_playbook: cadvisor.yml

View File

@ -1,2 +1,2 @@
---
- include: "{{ cadvisor_action }}.yml"
- include_tasks: "{{ cadvisor_action }}.yml"

View File

@ -1,3 +1,3 @@
---
- include: pull.yml
- include: deploy.yml
- include_tasks: pull.yml
- include_tasks: deploy.yml

View File

@ -1,2 +1,2 @@
---
- include: "{{ docker_registry_action }}.yml"
- include_tasks: "{{ docker_registry_action }}.yml"

View File

@ -1,3 +1,3 @@
---
- include: pull.yml
- include: deploy.yml
- include_tasks: pull.yml
- include_tasks: deploy.yml

View File

@ -78,7 +78,7 @@
- "'Data loop file' in docker_info.stdout or docker_storage_driver not in docker_info.stdout"
- "'Images: 0' not in docker_info.stdout or 'Containers: 0' not in docker_info.stdout"
- include: storage.yml
- include_tasks: storage.yml
when: "'Data loop file' in docker_info.stdout or docker_storage_driver not in docker_info.stdout"
- include: config.yml
- include_tasks: config.yml

View File

@ -1,3 +1,3 @@
---
- include: config.yml
- include: start.yml
- include_tasks: config.yml
- include_tasks: start.yml

View File

@ -1,2 +1,2 @@
---
- include: "{{ inspection_store_action }}.yml"
- include_tasks: "{{ inspection_store_action }}.yml"

View File

@ -1,2 +1,2 @@
---
- include: deploy.yml
- include_tasks: deploy.yml

View File

@ -1,3 +1,3 @@
---
- include: pull.yml
- include: deploy.yml
- include_tasks: pull.yml
- include_tasks: deploy.yml

View File

@ -1,8 +1,10 @@
---
- include: install.yml
# NOTE: Use import_tasks here, since tags are not applied to tasks included via
# include_tasks.
- import_tasks: install.yml
tags:
- install
- include: config.yml
- import_tasks: config.yml
tags:
- config

View File

@ -6,9 +6,9 @@
# - Pass through variables
# - Nova ironic compute host
- include: test-defaults.yml
- include: test-extras.yml
- include: test-requirements.yml
- import_playbook: test-defaults.yml
- import_playbook: test-extras.yml
- import_playbook: test-requirements.yml
- hosts: localhost
connection: local

View File

@ -1,4 +1,6 @@
---
- include: config.yml
# NOTE: Use import_tasks here, since tags are not applied to tasks included via
# include_tasks.
- import_tasks: config.yml
tags:
- config

View File

@ -1,8 +1,8 @@
---
- include: test-no-journal.yml
- include: test-journal.yml
- include: test-bootstrapped-journal.yml
- include: test-data-journal.yml
- import_playbook: test-no-journal.yml
- import_playbook: test-journal.yml
- import_playbook: test-bootstrapped-journal.yml
- import_playbook: test-data-journal.yml
- hosts: localhost
connection: local

View File

@ -1,4 +1,6 @@
---
- include: config.yml
# NOTE: Use import_tasks here, since tags are not applied to tasks included via
# include_tasks.
- import_tasks: config.yml
tags:
- config

View File

@ -1,8 +1,10 @@
---
- include: install.yml
# NOTE: Use import_tasks here, since tags are not applied to tasks included via
# include_tasks.
- import_tasks: install.yml
tags:
- install
- include: config.yml
- import_tasks: config.yml
tags:
- config

View File

@ -1,2 +1,2 @@
---
- include: "{{ nodeexporter_action }}.yml"
- include_tasks: "{{ nodeexporter_action }}.yml"

View File

@ -1,3 +1,3 @@
---
- include: pull.yml
- include: deploy.yml
- include_tasks: pull.yml
- include_tasks: deploy.yml

View File

@ -1,2 +1,2 @@
---
- include: "{{ opensm_action }}.yml"
- include_tasks: "{{ opensm_action }}.yml"

View File

@ -1,3 +1,3 @@
---
- include: pull.yml
- include: deploy.yml
- include_tasks: pull.yml
- include_tasks: deploy.yml

View File

@ -1,3 +1,3 @@
---
- include: devices.yml
- include: rings.yml
- include_tasks: devices.yml
- include_tasks: rings.yml

View File

@ -1,7 +1,7 @@
---
- block:
- include: redhat.yml
- include_tasks: redhat.yml
when: yum_use_local_mirror | bool
- include: custom_repo.yml
- include_tasks: custom_repo.yml
when: ansible_os_family == 'RedHat'

View File

@ -1,2 +1,2 @@
---
- include: "{{ kayobe_diagnostics_phase }}.yml"
- include_tasks: "{{ kayobe_diagnostics_phase }}.yml"