Skip to content

Commit d11ba10

Browse files
committed
Use import_tasks/include_tasks for task files
1 parent 13d5f86 commit d11ba10

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

tasks/main.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
---
2-
- include: prelude.yml
3-
- include: validate.yml
4-
- include: install-daemon.yml
2+
- import_tasks: prelude.yml
3+
- import_tasks: validate.yml
4+
- name: Include install-daemon.yml
5+
include_tasks: install-daemon.yml
56
when: libvirt_host_install_daemon | bool
6-
- include: install-client.yml
7+
- name: Include install-client.yml
8+
include_tasks: install-client.yml
79
when:
810
- not libvirt_host_install_daemon | bool
911
- libvirt_host_install_client | bool
1012
- name: Run post-install stage
11-
include: "{{ post_install_path }}"
13+
include_tasks: "{{ post_install_path }}"
1214
with_first_found:
1315
- files:
1416
- post-install-{{ ansible_facts.distribution }}.yml
1517
- post-install-{{ ansible_facts.os_family }}.yml
1618
skip: true
1719
loop_control:
1820
loop_var: post_install_path
19-
- include: config.yml
21+
- name: Include config.yml
22+
include_tasks: config.yml
2023
when: libvirt_host_install_daemon | bool
21-
- include: pools.yml
22-
- include: networks.yml
24+
- name: Include pools.yml
25+
include_tasks: pools.yml
26+
when: libvirt_host_pools | length > 0
27+
- name: Include networks.yml
28+
include_tasks: networks.yml
29+
when: libvirt_host_networks | length > 0

tasks/pools.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
loop: "{{ libvirt_host_pools | flatten(levels=1) }}"
88
become: True
99

10-
- include_tasks:
10+
- name: include rbd.yml
11+
include_tasks:
1112
file: rbd.yml
1213
apply:
1314
become: True

0 commit comments

Comments
 (0)