From 4bca7405d96bdc96ca7cae20446d56eb10fb7dba Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 14 Feb 2018 17:23:37 -0600 Subject: [PATCH] Change include: to include_tasks: This removes the warnings in Ansible 2.4+. Change-Id: I17e4e40c3eeb4ea73c593cec1d3d6244fda2a78e --- tasks/lxc_cache.yml | 4 ++-- tasks/lxc_cache_create.yml | 3 +-- tasks/lxc_cache_preparation.yml | 2 +- tasks/lxc_install.yml | 2 +- tasks/lxc_install_apt.yml | 2 +- tasks/lxc_install_zypper.yml | 2 +- tasks/lxc_post_install.yml | 2 +- tasks/main.yml | 14 +++++++------- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/tasks/lxc_cache.yml b/tasks/lxc_cache.yml index d8fb374a..81dc11c1 100644 --- a/tasks/lxc_cache.yml +++ b/tasks/lxc_cache.yml @@ -40,13 +40,13 @@ tags: - always -- include: lxc_cache_preparation.yml +- include_tasks: lxc_cache_preparation.yml when: - lxc_image_cache_refresh | bool tags: - lxc_hosts-config -- include: lxc_cache_create.yml +- include_tasks: lxc_cache_create.yml when: - lxc_image_cache_refresh | bool tags: diff --git a/tasks/lxc_cache_create.yml b/tasks/lxc_cache_create.yml index 07740c0c..1e6c76ba 100644 --- a/tasks/lxc_cache_create.yml +++ b/tasks/lxc_cache_create.yml @@ -78,8 +78,7 @@ content: "{{ cache_time }}" dest: "{{ cache_path_fact }}/build_id" -- include: "{{ item }}" - static: no +- include_tasks: "{{ item }}" with_first_found: - files: - "lxc_container_{{ lxc_container_backing_store | default('None') }}.yml" diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index e3fe4d6f..a2e63c69 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -46,7 +46,7 @@ when: - (deployment_environment_variables | default({})).keys() | length > 0 -- include: "lxc_cache_preparation_systemd_{{ (systemd_version.stdout_lines[0].split()[-1] | int > 219) | ternary('new', 'old') }}.yml" +- include_tasks: "lxc_cache_preparation_systemd_{{ (systemd_version.stdout_lines[0].split()[-1] | int > 219) | ternary('new', 'old') }}.yml" - block: - name: Generate apt keys from LXC host for the container cache diff --git a/tasks/lxc_install.yml b/tasks/lxc_install.yml index 0e7c8caf..8871a724 100644 --- a/tasks/lxc_install.yml +++ b/tasks/lxc_install.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: "lxc_install_{{ ansible_pkg_mgr }}.yml" +- include_tasks: "lxc_install_{{ ansible_pkg_mgr }}.yml" tags: - install-apt - install-yum diff --git a/tasks/lxc_install_apt.yml b/tasks/lxc_install_apt.yml index f7c93eca..ba71c919 100644 --- a/tasks/lxc_install_apt.yml +++ b/tasks/lxc_install_apt.yml @@ -49,7 +49,7 @@ - lxc-irqbalance - lxc_hosts-config -- include: lxc_apparmor.yml +- include_tasks: lxc_apparmor.yml - name: Flush handler to reload apparmor profiles meta: flush_handlers diff --git a/tasks/lxc_install_zypper.yml b/tasks/lxc_install_zypper.yml index 7fa2dc45..aa658e77 100644 --- a/tasks/lxc_install_zypper.yml +++ b/tasks/lxc_install_zypper.yml @@ -50,7 +50,7 @@ - lxc-files - lxc_hosts-config -- include: lxc_apparmor.yml +- include_tasks: lxc_apparmor.yml - name: Flush handler to reload apparmor profiles meta: flush_handlers diff --git a/tasks/lxc_post_install.yml b/tasks/lxc_post_install.yml index 6dfc28a4..8e76f473 100644 --- a/tasks/lxc_post_install.yml +++ b/tasks/lxc_post_install.yml @@ -127,7 +127,7 @@ # Ensure apparmor reindex runs before other things that may fail - meta: flush_handlers -- include: lxc_selinux.yml +- include_tasks: lxc_selinux.yml when: - ansible_selinux.status is defined - ansible_selinux.status == "enabled" diff --git a/tasks/main.yml b/tasks/main.yml index 7a96e63e..83f7d9fa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -42,31 +42,31 @@ tags: - always -- include: lxc_pre_install.yml +- include_tasks: lxc_pre_install.yml tags: - lxc_hosts-install -- include: lxc_install.yml +- include_tasks: lxc_install.yml tags: - lxc_hosts-install -- include: lxc_cache_prestage.yml +- include_tasks: lxc_cache_prestage.yml tags: - lxc_hosts-config -- include: lxc_post_install.yml +- include_tasks: lxc_post_install.yml tags: - lxc_hosts-config -- include: lxc_kernel_tuning.yml +- include_tasks: lxc_kernel_tuning.yml tags: - lxc_hosts-config -- include: lxc_net.yml +- include_tasks: lxc_net.yml tags: - lxc_hosts-config -- include: lxc_cache.yml +- include_tasks: lxc_cache.yml tags: - lxc_hosts-install - lxc_hosts-config