Replace include by include_tasks 75/70775/1
authorManuel Buil <mbuil@suse.com>
Wed, 11 Apr 2018 12:41:21 +0000 (14:41 +0200)
committerManuel Buil <mbuil@suse.com>
Wed, 11 Apr 2018 12:41:21 +0000 (14:41 +0200)
Starting with ansible 2.4, when using include we get:

The use of 'include' for tasks has been deprecated.

Besides, there is a weird error at the openstack gates in which tasks
are not executed in the expected order and I was told that probably
the include syntax is breaking things as the ODL role is called using
the new include_role syntax.

Change-Id: I4faef6648543f70021b7b159ecd355236876bfe7
Signed-off-by: Manuel Buil <mbuil@suse.com>
tasks/install_odl.yml
tasks/install_odl_via_deb_repo.yml
tasks/install_odl_via_rpm_repo.yml
tasks/main.yml
tasks/open_nb_rest_port.yml
tasks/start_odl.yml

index c15f40590ded1d6c97fe504a1617f57c0a699c12..0f7068fe09bca27bb7a5305436beeebeed97872c 100755 (executable)
@@ -6,26 +6,26 @@
 # `ansible_distribtion` param: Operating system (Debian/Ubuntu/CentOS etc.)
 
 # Install ODL .deb using debian repo
-- include: install_odl_via_deb_repo.yml
+- include_tasks: install_odl_via_deb_repo.yml
   when:
     - ansible_os_family == "Debian"
     - install_method == "deb_repo"
 
 # Install ODL using .deb URL or local path to a .deb file
-- include: install_odl_via_deb_path.yml
+- include_tasks: install_odl_via_deb_path.yml
   when:
     - ansible_os_family == "Debian"
     - install_method == "deb_path"
 
 # Install ODL using Yum repo config
-- include: install_odl_via_rpm_repo.yml
+- include_tasks: install_odl_via_rpm_repo.yml
   when:
     - (ansible_os_family == "RedHat") or
       (ansible_os_family == "Suse")
     - install_method == "rpm_repo"
 
 # Install ODL using rpm URL or a local path to a rpm file
-- include: install_odl_via_rpm_path.yml
+- include_tasks: install_odl_via_rpm_path.yml
   when:
     - (ansible_os_family == "RedHat") or
       (ansible_os_family == "Suse")
index 1c6ecfc2e6318c7d551ab7cd2f7ee1da88489474..cd397b5f586a2b03e6ffdd7c2e28977993abbace 100755 (executable)
@@ -1,5 +1,5 @@
 ---
-- include: add_odl_deb_repo.yml
+- include_tasks: add_odl_deb_repo.yml
 
 - name: Install ODL via Deb repo
   apt:
index f6e426d44cf20b35b445abb8c19b597e156c5fe4..6346d74950f9f13ad1978aed617a358a779fa678 100644 (file)
@@ -1,8 +1,8 @@
 ---
-- include: add_odl_yum_repo.yml
+- include_tasks: add_odl_yum_repo.yml
   when: ansible_os_family == "RedHat"
 
-- include: add_odl_zypper_repo.yml
+- include_tasks: add_odl_zypper_repo.yml
   when: ansible_os_family == "Suse"
 
 - name: Install ODL via RPM repo
index f92c6dde6e41b4169a7b8da04a55dc1856c6de19..f90d0c81b5d816766b1b3416979681ee23b8fa24 100644 (file)
@@ -1,15 +1,15 @@
 ---
-- include: install_odl.yml
-- include: configure_cluster.yml
+- include_tasks: install_odl.yml
+- include_tasks: configure_cluster.yml
   when:
    - cluster
 
-- include: configure_karaf_features.yml
-- include: configure_nb_rest_port.yml
-- include: open_nb_rest_port.yml
-- include: configure_genius_tunnels.yml
+- include_tasks: configure_karaf_features.yml
+- include_tasks: configure_nb_rest_port.yml
+- include_tasks: open_nb_rest_port.yml
+- include_tasks: configure_genius_tunnels.yml
   when: "'odl-netvirt-sfc' in features"
-- include: start_odl.yml
-- include: configure_quagga.yml
+- include_tasks: start_odl.yml
+- include_tasks: configure_quagga.yml
   when:
     - quagga
index 62ffbe17eba4d4556d4ab13ea6a4192749576bf4..50a064cba181ee54a47f57f6703f9875491f555d 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- include: in_container.yml
+- include_tasks: in_container.yml
 
 - name: Check if FirewallD service is running
   command: systemctl is-active firewalld
index 404c330ffca4fd15e869504d90505d7bc5479d74..ee5920f9242cbe895704c260f0d3795f85e377fb 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- include: in_container.yml
+- include_tasks: in_container.yml
 
-- include: start_odl_systemd_service.yml
+- include_tasks: start_odl_systemd_service.yml
   when: in_container.rc == 1