Skip to content

Conversation

@ericsysmin
Copy link
Contributor

@ericsysmin ericsysmin commented May 6, 2020

Collections are not in .ansible, but in .ansible/collections

Run ansible-galaxy collection install $COLLECTION_FILE
Process install dependency map
|�Starting collection install process
|�Installing 'ericsysmin.system:1.0.0' to '/home/runner/.ansible/collections/ansible_collections/ericsysmin/system'

But when molecule loads, it's attempting to load collections directly from /home/runner/.ansible which is not correct

ANSIBLE_COLLECTIONS_PATHS: /home/runner/.cache/molecule/ansible-collection-system/chrony/collections:/home/runner/.ansible:/usr/share/ansible/collections:/etc/ansible/collections

I was able to confirm that using

ansible-galaxy collection install $COLLECTION_FILE -p /home/runner/.ansible

was a workaround, but definitely not the correct way.

PR Type

  • Bugfix Pull Request

@ssbarnea ssbarnea added the bug label May 6, 2020
@ericsysmin
Copy link
Contributor Author

Looks like it failed due to a lint check error?

@ericsysmin
Copy link
Contributor Author

@gundalow what does this mean

[INFO] This may take a few minutes...
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted /home/zuul/src/github.com/ansible-community/molecule/molecule/provisioner/ansible.py
All done! ✨ 🍰 ✨
1 file reformatted, 158 files left unchanged.

Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
Check for byte-order marker..............................................Passed
Check that executables have shebangs.....................................Passed
Check for merge conflicts................................................Passed
Debug Statements (Python)................................................Passed
flake8...................................................................Passed
yamllint.................................................................Passed
ERROR: InvocationError for command /home/zuul/src/github.com/ansible-community/molecule/.tox/lint/bin/python -m pre_commit run --all (exited with code 1)
lint finish: run-test  after 75.23 seconds
lint start: run-test-post 
lint finish: run-test-post  after 0.00 seconds
___________________________________ summary ____________________________________
ERROR:   lint: commands failed

Not sure if I caused that or if it's even related? What I changed shouldn't of caused a lint failure.

@gundalow
Copy link
Contributor

gundalow commented May 7, 2020

recheck

@ansible-zuul ansible-zuul bot removed the gate label May 7, 2020
ericsysmin added 2 commits May 7, 2020 10:32
Collections are not in .ansible, but in .ansible/collections
```
Run ansible-galaxy collection install $COLLECTION_FILE
Process install dependency map
|�Starting collection install process
|�Installing 'ericsysmin.system:1.0.0' to '/home/runner/.ansible/collections/ansible_collections/ericsysmin/system'
```

But when molecule loads, it's attempting to load collections directly from /home/runner/.ansible which is not correct
```
ANSIBLE_COLLECTIONS_PATHS: /home/runner/.cache/molecule/ansible-collection-system/chrony/collections:/home/runner/.ansible:/usr/share/ansible/collections:/etc/ansible/collections
```

I was able to confirm that using 
```
ansible-galaxy collection install $COLLECTION_FILE -p /home/runner/.ansible
```
was a workaround, but definitely not the correct way.
@ssbarnea ssbarnea added the gate label May 7, 2020
@ansible-zuul ansible-zuul bot merged commit c763fb6 into ansible:master May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants