collections/requirements.yml support

* just like we support ansible-galaxy role install, support
ansible-galaxy collection install
This commit is contained in:
chris meyers
2019-07-18 14:44:59 -04:00
committed by AlanCoding
parent f1f57e45de
commit 4be65a0879
4 changed files with 40 additions and 1 deletions

View File

@@ -135,3 +135,18 @@
when: roles_enabled|bool
delegate_to: localhost
- block:
# TODO: don't run this if ansible verison doens't support collections
- name: detect collections/requirements.yml
stat: path={{project_path|quote}}/collections/requirements.yml
register: doesCollectionRequirementsExist
- name: fetch galaxy collections from collections/requirements.yml
command: ansible-galaxy collection install -r requirements.yml -p {{collections_destination|quote}}
args:
chdir: "{{project_path|quote}}/collections"
register: galaxy_collection_result
when: collections_enabled|bool
delegate_to: localhost