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

Run Ansible Lint Action against custom_json.yml #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

webknjaz
Copy link
Member

No description provided.

@kdelee
Copy link
Member

kdelee commented Apr 2, 2019

👋 Hey, looks fine but I'm not sure I understand intent.

Is this something to test out ansible-lint or the playbooks? Or is it for testing out the github action? Would you want to move towards running this against all playbooks in this project?

@webknjaz
Copy link
Member Author

webknjaz commented Apr 2, 2019

It's testing playbooks + also dogfooding Ansible Lint and an Action I've built.
We can add more but if a lot of things are uncompliant somebody would need to go through those and fix them. So I chose just one playbook for now.

@AlanCoding
Copy link
Member

I think that running lint on all these playbooks is a great idea, but I'd like to start out getting them all converted, and also running that against PRs. I don't fully see how this gets us there, or what's left to do.

@kdelee
Copy link
Member

kdelee commented Jul 23, 2019

@webknjaz
Hey sorry lost track of this. I am open to getting this merged but first can you add some documentation about how we would expand this to run on all playbooks and in general how it works/how to maintain it?

@webknjaz
Copy link
Member Author

currently only supports linting one file specified by ACTION_PLAYBOOK_NAME in https://github.com/ansible/ansible-lint-action/blob/master/entrypoint.sh . In future we will add directory support.

@kdelee
Copy link
Member

kdelee commented Jul 23, 2019

@webknjaz can you put that comment in the file so future person knows where to look? #54 (comment)

@webknjaz
Copy link
Member Author

What file? main.workflow? I'm not sure whether it supports comments. It's generated with a visual workflow editor.

@webknjaz
Copy link
Member Author

FTR, here's a marketplace page of the action: https://github.com/marketplace/actions/ansible-lint

@webknjaz
Copy link
Member Author

FWIW there's Git blame + the PR link will be in the merge commit so it's very easy to track it back here.

@AlanCoding
Copy link
Member

I feel like this would be a lot more useful if it could target multiple playbooks. I would not have a problem applying the policies to all of them.

@kdelee
Copy link
Member

kdelee commented Jul 24, 2019

@AlanCoding I say let's give it a whirl as is and ask for directory support

@webknjaz
Copy link
Member Author

I'm okay with adding directory support. Just don't have time to do it right now. But the repo is open so feel free to send a PR there :)

Currently, it kinda supports looking up all playbook.yml files. I think that any implementation will need to have user specifying playbook names because otherwise, it'll end up linting all kinds of weird YAML files and barking at them for not being playbooks.

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.

3 participants