From ead5ec8589abaefa8f3bdd17e03c6b470b4ed072 Mon Sep 17 00:00:00 2001 From: ZhijunWei Date: Sun, 19 Aug 2018 12:14:09 -0400 Subject: [PATCH] use include_tasks 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: I5b9e7be4c7212e3c483d2c65746629416cd309f2 --- tasks/main.yml | 12 ++++++------ tasks/repo_build_prepare.yml | 2 +- tests/test.yml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 857be40..0428c3d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,11 +24,11 @@ tags: - always -- include: repo_build_install.yml +- include_tasks: repo_build_install.yml tags: - repo-build-install -- include: repo_build_prepare.yml +- include_tasks: repo_build_prepare.yml tags: - always @@ -39,20 +39,20 @@ tags: - always -- include: repo_build_wheels.yml +- include_tasks: repo_build_wheels.yml when: - ansible_local['openstack_ansible']['repo_build']['need_wheel_build'] | bool tags: - repo-build-wheels -- include: repo_build_venvs.yml +- include_tasks: repo_build_venvs.yml tags: - repo-build-venvs -- include: repo_build_index.yml +- include_tasks: repo_build_index.yml tags: - repo-build-index # Synchronize all built packages back to the repo master -- include: repo_package_sync.yml +- include_tasks: repo_package_sync.yml when: inventory_hostname != groups['repo_all'][0] diff --git a/tasks/repo_build_prepare.yml b/tasks/repo_build_prepare.yml index 13299ef..175ea4f 100644 --- a/tasks/repo_build_prepare.yml +++ b/tasks/repo_build_prepare.yml @@ -44,7 +44,7 @@ dest: "{{ repo_build_release_path }}/requirements.txt" register: _wheel_build_requirements -- include: repo_clone_git.yml +- include_tasks: repo_clone_git.yml when: - (repo_build_git_reclone | bool) or (_wheel_build_requirements | changed) diff --git a/tests/test.yml b/tests/test.yml index ab2ab36..625d4ff 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -14,10 +14,10 @@ # limitations under the License. # Prepare the host -- include: common/test-setup-host.yml +- import_playbook: common/test-setup-host.yml # Install repo server -- include: test-install-server.yml +- import_playbook: test-install-server.yml # Build repo -- include: test-repo-build.yml +- import_playbook: test-repo-build.yml