Browse Source

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: I9d70ec2b84cfb1ccd465e52c96addfadf248f3d1
ZhijunWei 8 months ago
parent
commit
1ccaa81bc7
3 changed files with 15 additions and 18 deletions
  1. 9
    12
      tasks/main.yml
  2. 1
    1
      tests/test-install-gnocchi.yml
  3. 5
    5
      tests/test.yml

+ 9
- 12
tasks/main.yml View File

@@ -25,39 +25,37 @@
25 25
   tags:
26 26
     - always
27 27
 
28
-- include: gnocchi_pre_install.yml
28
+- include_tasks: gnocchi_pre_install.yml
29 29
   tags:
30 30
     - gnocchi-install
31 31
 
32
-- include: gnocchi_install.yml
32
+- include_tasks: gnocchi_install.yml
33 33
   tags:
34 34
     - gnocchi-install
35 35
 
36
-- include: gnocchi_post_install.yml
37
-  static: no
36
+- include_tasks: gnocchi_post_install.yml
38 37
   when: not gnocchi_identity_only | bool
39 38
   tags:
40 39
     - gnocchi-config
41 40
 
42
-- include: "gnocchi_init_{{ ansible_service_mgr }}.yml"
41
+- include_tasks: "gnocchi_init_{{ ansible_service_mgr }}.yml"
43 42
   when: not gnocchi_identity_only | bool
44 43
   tags:
45 44
     - gnocchi-config
46 45
 
47
-- include: gnocchi_service_setup.yml
48
-  static: no
46
+- include_tasks: gnocchi_service_setup.yml
49 47
   when:
50 48
     - inventory_hostname == groups['gnocchi_all'][0]
51 49
     - not gnocchi_identity_only | bool
52 50
   tags:
53 51
     - gnocchi-config
54 52
 
55
-- include: gnocchi_identity_setup.yml
53
+- include_tasks: gnocchi_identity_setup.yml
56 54
   when: inventory_hostname == groups['gnocchi_all'][0]
57 55
   tags:
58 56
     - gnocchi-config
59 57
 
60
-- include: gnocchi_ceph_python_libs.yml
58
+- include_tasks: gnocchi_ceph_python_libs.yml
61 59
   when:
62 60
     - gnocchi_storage_driver == 'ceph'
63 61
   tags:
@@ -65,15 +63,14 @@
65 63
 
66 64
 # N.B. Must occur after identity setup, as this may perform calls to Swift.
67 65
 #      Similarly, when using Ceph, must occur after Ceph setup.
68
-- include: gnocchi_db_setup.yml
66
+- include_tasks: gnocchi_db_setup.yml
69 67
   when:
70 68
     - inventory_hostname == groups['gnocchi_all'][0]
71 69
     - not gnocchi_identity_only | bool
72 70
   tags:
73 71
     - gnocchi-config
74 72
 
75
-- include: gnocchi_apache.yml
76
-  static: no
73
+- include_tasks: gnocchi_apache.yml
77 74
   when:
78 75
     - gnocchi_use_mod_wsgi | bool
79 76
     - not gnocchi_identity_only | bool

+ 1
- 1
tests/test-install-gnocchi.yml View File

@@ -20,7 +20,7 @@
20 20
   vars_files:
21 21
     - common/test-vars.yml
22 22
   pre_tasks:
23
-    - include: common/create-grant-db.yml
23
+    - include_tasks: common/create-grant-db.yml
24 24
       db_password: "{{ gnocchi_container_mysql_password }}"
25 25
       db_name: "gnocchi"
26 26
   roles:

+ 5
- 5
tests/test.yml View File

@@ -14,16 +14,16 @@
14 14
 # limitations under the License.
15 15
 
16 16
 # Setup the host
17
-- include: common/test-setup-host.yml
17
+- import_playbook: common/test-setup-host.yml
18 18
 
19 19
 # Install RabbitMQ/MariaDB
20
-- include: common/test-install-infra.yml
20
+- import_playbook: common/test-install-infra.yml
21 21
 
22 22
 # Install Keystone
23
-- include: common/test-install-keystone.yml
23
+- import_playbook: common/test-install-keystone.yml
24 24
 
25 25
 # Install Gnocchi
26
-- include: test-install-gnocchi.yml
26
+- import_playbook: test-install-gnocchi.yml
27 27
 
28 28
 # Test Gnocchi
29
-- include: test-gnocchi-functional.yml
29
+- import_playbook: test-gnocchi-functional.yml

Loading…
Cancel
Save