From 2fe69b9735e73f5be0a1c21fcfae784bba91217e Mon Sep 17 00:00:00 2001 From: ZhijunWei Date: Sun, 19 Aug 2018 12:06:06 -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: Ieff641e85a61b596f8a3a96820e1842d91f8f05c --- tasks/neutron_install.yml | 2 +- tasks/providers/opendaylight_config.yml | 2 +- tests/benchmark-upgrade.yml | 6 +++--- tests/test-install-previous-neutron.yml | 8 ++++---- tests/test-upgrade.yml | 10 +++++----- tests/test.yml | 18 +++++++++--------- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index fd8e0659..fa05e0bb 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -72,7 +72,7 @@ ('need_db_expand' not in ansible_local['openstack_ansible']['neutron']) or ('need_db_contract' not in ansible_local['openstack_ansible']['neutron']) -- include: neutron_selinux.yml +- include_tasks: neutron_selinux.yml when: - ansible_selinux.status == "enabled" diff --git a/tasks/providers/opendaylight_config.yml b/tasks/providers/opendaylight_config.yml index 3e6be0da..c8ae1de4 100644 --- a/tasks/providers/opendaylight_config.yml +++ b/tasks/providers/opendaylight_config.yml @@ -40,5 +40,5 @@ - opendaylight-install - opendaylight-pip-packages -- include: setup_ovs_opendaylight.yml +- include_tasks: setup_ovs_opendaylight.yml when: neutron_services['neutron-server']['group'] not in group_names diff --git a/tests/benchmark-upgrade.yml b/tests/benchmark-upgrade.yml index 606a4a1a..78dc2e20 100644 --- a/tests/benchmark-upgrade.yml +++ b/tests/benchmark-upgrade.yml @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: test-neutron-resources-upgrade.yml +- import_playbook: test-neutron-resources-upgrade.yml -- include: common/test-install-neutron.yml +- import_playbook: common/test-install-neutron.yml -- include: test-neutron-resources-results.yml +- import_playbook: test-neutron-resources-results.yml diff --git a/tests/test-install-previous-neutron.yml b/tests/test-install-previous-neutron.yml index 7214db33..fe24ce50 100644 --- a/tests/test-install-previous-neutron.yml +++ b/tests/test-install-previous-neutron.yml @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: common/setting-nodepool-variables.yml +- import_playbook: common/setting-nodepool-variables.yml # Ensure the repo is setup for previous version -- include: common/previous/test-repo-setup.yml +- import_playbook: common/previous/test-repo-setup.yml - name: Make /lib/modules accessible on neutron_agent containers hosts: neutron_agent @@ -85,11 +85,11 @@ when: - inventory_hostname in groups['neutron_all'] - ansible_pkg_mgr in ['yum', 'dnf'] - - include: common/ensure-rabbitmq.yml + - include_tasks: common/ensure-rabbitmq.yml vhost_name: "{{ neutron_rabbitmq_vhost }}" user_name: "{{ neutron_rabbitmq_userid }}" user_password: "{{ neutron_rabbitmq_password }}" - - include: common/create-grant-db.yml + - include_tasks: common/create-grant-db.yml db_name: "{{ neutron_galera_database }}" db_password: "{{ neutron_container_mysql_password }}" roles: diff --git a/tests/test-upgrade.yml b/tests/test-upgrade.yml index ecdc35f3..62db6b7b 100644 --- a/tests/test-upgrade.yml +++ b/tests/test-upgrade.yml @@ -14,18 +14,18 @@ # limitations under the License. # Setup the user ssh keys, host and containers -- include: common/test-setup-host.yml +- import_playbook: common/test-setup-host.yml # Install haproxy -- include: common/test-install-haproxy.yml +- import_playbook: common/test-install-haproxy.yml # Install RabbitMQ/MariaDB -- include: common/test-install-infra.yml +- import_playbook: common/test-install-infra.yml # Install etcd -- include: common/test-install-etcd.yml +- import_playbook: common/test-install-etcd.yml when: - groups['neutron_calico_dhcp_agent'] | length > 0 # Install Keystone -- include: common/test-install-keystone.yml +- import_playbook: common/test-install-keystone.yml diff --git a/tests/test.yml b/tests/test.yml index fd3b28bb..2fbc54a8 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -14,26 +14,26 @@ # limitations under the License. # Setup the user ssh keys, host and containers -- include: common/test-setup-host.yml +- import_playbook: common/test-setup-host.yml # Install haproxy -- include: common/test-install-haproxy.yml +- import_playbook: common/test-install-haproxy.yml # Install RabbitMQ/MariaDB -- include: common/test-install-infra.yml +- import_playbook: common/test-install-infra.yml # Install etcd -- include: common/test-install-etcd.yml +- import_playbook: common/test-install-etcd.yml # Install Keystone -- include: common/test-install-keystone.yml +- import_playbook: common/test-install-keystone.yml # Install Neutron -- include: common/test-install-neutron.yml +- import_playbook: common/test-install-neutron.yml # Install and execute tempest -- include: common/test-install-tempest.yml +- import_playbook: common/test-install-tempest.yml -- include: test-calico-functional.yml +- import_playbook: test-calico-functional.yml -- include: test-dragonflow-functional.yml +- import_playbook: test-dragonflow-functional.yml