Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint pass: 2024-08-01 #4

Merged
merged 29 commits into from
Aug 1, 2024
Merged

Lint pass: 2024-08-01 #4

merged 29 commits into from
Aug 1, 2024

Conversation

crichez
Copy link
Owner

@crichez crichez commented Aug 1, 2024

Overview

This pull request resolves lint errors from ansible-lint.

Christopher Palmer-Richez added 26 commits July 31, 2024 21:48
These recent commits are confusing I know, this is related to the
"official" ansible-lint github action not being able to find collections
that are supposed to be installed by default. I'm having a difficult
time understanding where the requirements file will be read, but that is
likely because I use a slightly unusual structure for role distribution?
This commit uses reference from https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file
Still don't get where I'm expected to put this.
This commit moves the requirements.yml file back to the root dir (yes, I
know I tried this already), and moves the test playbook to the playbooks
dir, which is a standard collection root dir. This is meant to see if
the playbook.yaml file is being linted without resolving dependencies,
whereas a role might not? Note that the docs at
https://ansible.readthedocs.io/projects/lint/usage/#dependencies-and-requirements
conflict with the docs referenced in previous commits. The ansible-lint
docs don't suggest that the requirements.yml file will be detected in
roles/<role>/meta/requirements.yml.
Also properly removes playbook.yaml from root as desired in previous
commits.
Not sure what is actually in the runner image.
This commit switches to ansible-test instead of ansible-lint due
to its availability in the main runner image without the use of the
ansible-lint action.
Runner does not have subdirs that are standard with a regular ansible
installation.
Looks like it does not support shell variable substitution. Use a hard
path for now, we will make this pretty later.
This is needed by ansible-test.
This commit reattempts to use ansible-lint from a shell, but installs it
first.
@crichez crichez self-assigned this Aug 1, 2024
@crichez crichez merged commit 34b762e into main Aug 1, 2024
1 check passed
@crichez crichez deleted the fix/lint-20240801 branch August 1, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant