Skip to content

Commit d357156

Browse files
authored
Merge pull request #192 from ansible/list_collections
list collections before running jinja'd template
2 parents 4b5995d + 1670289 commit d357156

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tower_collection_smoke.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
src_file: tower_collection_smoke.j2
77
dest_file: tower_collection_actual.yml
88
tasks:
9+
- name: "List what collections are installed (only available with ansible 2.10+)"
10+
shell: "ansible-galaxy collection list"
11+
register: ansible_collections_list
12+
when: ansible_version.full is version('2.10.0', '>=')
13+
14+
- name: "Echo what collections are installed (only available with ansible 2.10+)"
15+
debug:
16+
msg: "{{ ansible_collections_list.stdout_lines }}"
17+
when: ansible_version.full is version('2.10.0', '>=')
18+
919
- name: "Create playbook to call with collection FQCN"
1020
template:
1121
src: "{{ src_file }}"

0 commit comments

Comments
 (0)