Skip to content

Commit

Permalink
install collection deps before import test
Browse files Browse the repository at this point in the history
A collection import test may fail if the are not installed.
We now install the collections locally, this way `ansible-galaxy` will
pull the depdendencies for us.

See: ansible-collections/community.general#402
  • Loading branch information
goneri committed Jun 2, 2020
1 parent 415fb6c commit e52aa68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playbooks/build-ansible-collection/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
patterns: "*.tar.gz"
register: result

- name: Install the Collections locally, to be sure the dependencies get pulled
command: "{{ ansible_galaxy_executable }} collection install {{ item.path }}"
loop: "{{ result.files }}"

- name: Confirm collection can be imported into galaxy
loop: "{{ result.files }}"
when: "item.path.endswith('.tar.gz')"
Expand Down

0 comments on commit e52aa68

Please sign in to comment.