-
Notifications
You must be signed in to change notification settings - Fork 0
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
Automatically lint new PRs #3
Conversation
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 is related to ansible/ansible-lint#2828 but I can't find a resolution anywhere. I get it, python venvs require careful config, but the project does not provide any guidance on doing it correctly and repeatedly tells us it "just works" like in https://ansible.readthedocs.io/projects/lint/usage/#dependencies-and-requirements. Will likely try a more proper collection layout on a different branch and see if this improves. |
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.
This was a syntax error.
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.
Objectives
This pull request introduces a new GitHub Actions workflow that runs
ansible-lint
on pull requests.