From ca76d4b9106000d4bea0c539713ff48603179fdf Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 15 Feb 2018 10:25:59 -0600 Subject: [PATCH] Change include: to include_tasks: This removes warnings in Ansible 2.4+. The patch also removes the "static:" arguments since they are no longer used by Ansible. Change-Id: I1448501507daae92022a803af80839286f3542f2 --- meta/main.yml | 2 +- tasks/main.yml | 33 +++++++++++---------------------- tasks/swift_install.yml | 3 +-- tasks/swift_key_setup.yml | 4 ++-- tasks/swift_rings.yml | 14 +++++++------- tasks/swift_storage_hosts.yml | 8 ++++---- 6 files changed, 26 insertions(+), 38 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index ecbf6051..ce7defff 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,7 +18,7 @@ galaxy_info: description: Installation and setup of swift company: Rackspace license: Apache2 - min_ansible_version: 2.2 + min_ansible_version: 2.4 platforms: - name: Ubuntu versions: diff --git a/tasks/main.yml b/tasks/main.yml index 2f3b6ae2..e867cc63 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -25,67 +25,58 @@ - always # Check the swift_hash_path_* variables haven't changed -- include: swift_check_hashes.yml - static: no +- include_tasks: swift_check_hashes.yml when: - "not swift_force_change_hashes | bool" tags: - swift-config -- include: swift_pre_install.yml - static: no +- include_tasks: swift_pre_install.yml when: - "swift_do_setup | bool" - "'swift_all' in group_names" tags: - swift-install -- include: swift_install.yml - static: no +- include_tasks: swift_install.yml when: - "swift_do_setup | bool" - "'swift_all' in group_names" tags: - swift-install -- include: swift_post_install.yml - static: no +- include_tasks: swift_post_install.yml when: - "swift_do_setup | bool" - "'swift_all' in group_names" tags: - swift-config -- include: swift_calculate_addresses.yml - static: no +- include_tasks: swift_calculate_addresses.yml when: - "'swift_hosts' in group_names" tags: - always -- include: swift_storage_hosts.yml - static: no +- include_tasks: swift_storage_hosts.yml when: - "swift_do_setup | bool" - "'swift_hosts' in group_names" tags: - swift-config -- include: swift_proxy_hosts.yml - static: no +- include_tasks: swift_proxy_hosts.yml when: - "swift_do_setup | bool" - "'swift_proxy' in group_names" tags: - swift-config -- include: "swift_init_{{ ansible_service_mgr }}.yml" - static: no +- include_tasks: "swift_init_{{ ansible_service_mgr }}.yml" tags: - swift-config -- include: swift_service_setup.yml - static: no +- include_tasks: swift_service_setup.yml when: - "swift_do_setup | bool" - '"keystoneauth" in swift_middleware_list' @@ -93,15 +84,13 @@ tags: - swift-config -- include: swift_key_setup.yml - static: no +- include_tasks: swift_key_setup.yml when: - "swift_do_sync | bool" tags: - swift-config -- include: swift_rings.yml - static: no +- include_tasks: swift_rings.yml when: - "swift_do_sync | bool" tags: diff --git a/tasks/swift_install.yml b/tasks/swift_install.yml index 7d8583b7..be43e031 100644 --- a/tasks/swift_install.yml +++ b/tasks/swift_install.yml @@ -120,8 +120,7 @@ tags: - skip_ansible_lint -- include: swift_pypy_setup.yml - static: no +- include_tasks: swift_pypy_setup.yml when: swift_pypy_enabled | bool - name: Record the venv tag deployed diff --git a/tasks/swift_key_setup.yml b/tasks/swift_key_setup.yml index fb5d745a..57b01313 100644 --- a/tasks/swift_key_setup.yml +++ b/tasks/swift_key_setup.yml @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: swift_key_populate.yml +- include_tasks: swift_key_populate.yml -- include: swift_key_distribute.yml +- include_tasks: swift_key_distribute.yml diff --git a/tasks/swift_rings.yml b/tasks/swift_rings.yml index 36b1c577..47636503 100644 --- a/tasks/swift_rings.yml +++ b/tasks/swift_rings.yml @@ -13,22 +13,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: swift_rings_selinux.yml +- include_tasks: swift_rings_selinux.yml when: - ansible_selinux.status is defined - ansible_selinux.status == "enabled" -- include: swift_rings_md5sum.yml +- include_tasks: swift_rings_md5sum.yml -- include: swift_rings_check.yml +- include_tasks: swift_rings_check.yml when: inventory_hostname == groups['swift_hosts'][0] -- include: swift_rings_build.yml +- include_tasks: swift_rings_build.yml when: inventory_hostname == groups['swift_hosts'][0] -- include: swift_rings_distribute.yml +- include_tasks: swift_rings_distribute.yml -- include: swift_rings_md5sum.yml +- include_tasks: swift_rings_md5sum.yml -- include: swift_rings_post_distribution_check.yml +- include_tasks: swift_rings_post_distribution_check.yml when: inventory_hostname == groups['swift_hosts'][0] diff --git a/tasks/swift_storage_hosts.yml b/tasks/swift_storage_hosts.yml index d33f083f..6c887bff 100644 --- a/tasks/swift_storage_hosts.yml +++ b/tasks/swift_storage_hosts.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: swift_storage_hosts_setup.yml -- include: swift_storage_hosts_object.yml -- include: swift_storage_hosts_account.yml -- include: swift_storage_hosts_container.yml +- include_tasks: swift_storage_hosts_setup.yml +- include_tasks: swift_storage_hosts_object.yml +- include_tasks: swift_storage_hosts_account.yml +- include_tasks: swift_storage_hosts_container.yml