https://github.com/alancoding/collection-requirements-cases
use cases for collection requirements
https://github.com/alancoding/collection-requirements-cases
Last synced: 4 months ago
JSON representation
use cases for collection requirements
- Host: GitHub
- URL: https://github.com/alancoding/collection-requirements-cases
- Owner: AlanCoding
- License: mit
- Created: 2019-08-22T14:04:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-26T15:23:49.000Z (almost 6 years ago)
- Last Synced: 2025-01-03T05:39:04.144Z (6 months ago)
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# collection-requirements-cases
use cases for collection requirements
How this works for the reference case:
```
ansible-galaxy collection install -r reference/collections/requirements.yml -p dest
rm -rf dest/ansible_collections/
```This should run without any problems
### Invalid (does not) Fallback
```
ANSIBLE_CONFIG=fallback_invalid/ansible.cfg ansible-galaxy collection install -r fallback_invalid/collections/requirements.yml -p dest -vvvv
```This does not work.
In other words, it does not fall back to the 2nd server due to a
"servname not found" error with the first server.### Not Found Fallback
```
ANSIBLE_CONFIG=fallback_not_found/ansible.cfg ansible-galaxy collection install -r fallback_not_found/collections/requirements.yml -p dest -vvvv
rm -rf dest/ansible_collections/
```Does not exist:
- https://galaxy-dev.ansible.com/chrismeyersfsu/tower_modules
- https://galaxy-dev.ansible.com/chrismeyersfsu/test_thingsExists:
- https://galaxy.ansible.com/chrismeyersfsu/tower_modules
- https://galaxy.ansible.com/chrismeyersfsu/test_thingsThis does work. In this case it tries the dev galaxy. Upon this producing a 404 error,
it tries the release galaxy. The release galaxy server works, and the
requirements are installed from there.#### Repeating with environment variables
```
ANSIBLE_GALAXY_SERVER_FOO_URL=https://galaxy.ansible.com ANSIBLE_GALAXY_SERVER_BAR_URL=https://galaxy-dev.ansible.com ANSIBLE_GALAXY_SERVER_LIST=bar,foo ansible-galaxy collection install -r fallback_not_found/collections/requirements.yml -p dest -vvvv
rm -rf dest/ansible_collections/
```This did not work at first, but an issue was filed and the problem was fixed.
Now, for Ansible 2.9, this command works fine.