Debian Codegraph @

test/integration/targets/ansible-galaxy-collection-scm/tasks/reinstalling.yml

raw
1 - name: Rerun installing a collection with a dep
2 command: 'ansible-galaxy collection install git+file://{{ test_repo_path }}/.git#/collection_1/'
3 register: installed
4
5 - name: SCM collections don't have a concrete artifact version so the collection should always be reinstalled
6 assert:
7 that:
8 - "'Created collection for ansible_test.collection_1' in installed.stdout"
9 - "'Created collection for ansible_test.collection_2' in installed.stdout"
10
11 - name: The collection should also be reinstalled when --force flag is used
12 command: 'ansible-galaxy collection install git+file://{{ test_repo_path }}/.git#/collection_1/ --force'
13 register: installed
14
15 - assert:
16 that:
17 - "'Created collection for ansible_test.collection_1' in installed.stdout"
18 # The dependency is also an SCM collection, so it should also be reinstalled
19 - "'Created collection for ansible_test.collection_2' in installed.stdout"
20
21 - name: The collection should also be reinstalled when --force-with-deps is used
22 command: 'ansible-galaxy collection install git+file://{{ test_repo_path }}/.git#/collection_1/ --force-with-deps'
23 register: installed
24
25 - assert:
26 that:
27 - "'Created collection for ansible_test.collection_1' in installed.stdout"
28 - "'Created collection for ansible_test.collection_2' in installed.stdout"
29
30 - include_tasks: ./empty_installed_collections.yml
31 when: cleanup