- Notifications
You must be signed in to change notification settings - Fork707
ansible-lint checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you
License
ansible/ansible-lint
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ansible-lint checks playbooks for practices and behavior that couldpotentially be improved. As a community-backed project ansible-lint supportsonly the last two major versions of Ansible.
Visit the Ansible Lint docs site
This action allows you to runansible-lint on your codebase without having toinstall it yourself.
# .github/workflows/ansible-lint.ymlname:ansible-linton:pull_request:branches:["main", "stable", "release/v*"]jobs:build:name:Ansible Lint# Naming the build is important to use it as a status checkruns-on:ubuntu-24.04steps: -uses:actions/checkout@v4 -name:Run ansible-lintuses:ansible/ansible-lint@main# or vX.X.X version# optional (see below):with:args:""gh_action_ref:"<version - e.g. `v25.5.0`>"# Not recommended for non-composite action usesetup_python:"true"working_directory:""requirements_file:""
By default, the workflow uses ansible-lint installed frommain. For production or stable workflows, it is recommended to specify a particular release tag (in format v.X.X.X).
All the arguments are optional:
args: Arguments to be passed to ansible-lint command.gh_action_ref: The git branch, tag, or commit to use for ansible-lint.Not recommended for standard use - only use with composite actions whereGH_ACTION_REFis set to the parent action version.requirements_file: Path to the requirements.yml file to install role andcollection dependencies.setup_python: If python should be installed. Default istrue.working_directory: The directory where to run ansible-lint from. Default isgithub.workspace. Needed if you want to lint only a subset ofyour repository.
For more details, seeansible-lint-action.
Refer to theTalk to ussection of the Contributing guide to find out how to get in touch with us.
You can also find more information in theAnsible communication guide.
Please readContribution guidelines if you wish to contribute.
Please see theAnsible Community Code of Conduct.
The ansible-lint project is distributed asGPLv3 due to use ofGPLv3 runtimedependencies, likeansible andyamllint.
For historical reasons, its own code-base remains licensed under a more liberalMIT license and any contributions made are accepted as being made underoriginalMIT license.
ansible-lint was created byWill Thames and is now maintained as part of theAnsiblebyRed Hat project.
About
ansible-lint checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.