failing to find installed collections/modules #113
-
I can't figure out what I am missing here, but I cannot get the linter to see modules from other collections. .github/workflows/main.yml
run output
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
You may need to specify steps:
- name: Clone Repo
uses: actions/checkout@v2
- name: Install required collections
run: ansible-galaxy collection install -p /usr/share/ansible/collections -f -r collections/requirements.yml
- name: Run ansible-lint
uses: ansible-community/ansible-lint-action@main
env:
ANSIBLE_LIBRARY: '/usr/share/ansible/collections'
with:
path: "playbooks/" Check env var docs for more info. |
Beta Was this translation helpful? Give feedback.
-
that did not seem to change anything |
Beta Was this translation helpful? Give feedback.
-
I have the same problem regarding using |
Beta Was this translation helpful? Give feedback.
-
If you create a |
Beta Was this translation helpful? Give feedback.
-
@ssbarnea while the requirements.yml works I do not thing it is the cleanest approach. On the Github runners a bunch of collections are already installed but the are not located on the COLLECTIONS path. So we either have to re-install the ones we need (which is what requirements.yml does) or we need to update the COLLECTIONS path in the workflow to point to where the runner's collections are installed. |
Beta Was this translation helpful? Give feedback.
-
Can you elaborate
…On Wed, Oct 19, 2022, 6:18 PM Stephen Bates ***@***.***> wrote:
@ssbarnea <https://github.com/ssbarnea> while the requirements.yml works
I do not thing it is the cleanest approach. On the Github runners a bunch
of collections are already installed but the are not located on the
COLLECTIONS path. So we either have to re-install the ones we need (which
is what requirements.yml does) or we need to update the COLLECTIONS path in
the workflow to point to where the runner's collections are installed.
—
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQTM2UVNOGSCT52RL5I3M5LWEBXU7ANCNFSM5ZXTZCSQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: <ansible/ansible-lint-action/repo-discussions/113/comments/3919475@
github.com>
|
Beta Was this translation helpful? Give feedback.
If you create a
requirements.yml
file, the linter will know to install the required collections. Some requirements apply for running the linter from the command line, so that not really specific to this action.