Uses ansible-lint to check Ansible playbooks for practices
and behaviour that could potentially be improved.
Details
- Reviewers
joshuaspence epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T7293: Add support for ansible-lint
- run arc linters -- ansible-lint should show up
- install https://pypi.python.org/pypi/ansible-lint
- install https://pypi.python.org/pypi/ansible-role-manager
- create a skeleton playbook using arm init -p test-playbook
- create an .arclint containing
{
"linters": { "playbooks": { "type": "ansible-lint", "include": "(\\.yml$)" } }
}
- arc lint --everything. Verify that the output tallies with running ansible-lint directly
Diff Detail
- Repository
- rARC Arcanist
- Branch
- T7293
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 4532 Build 4546: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
605 ms | ArcanistLesscLinterTestCase::testLinter | |
179 ms | ArcanistChmodLinterTestCase::testLinter | |
0 ms | ArcanistClosureLinterTestCase::testVersion | |
26 ms | ArcanistCommitLinterTestCase::testLinter | |
0 ms | ArcanistCpplintLinterTestCase::testVersion | |
View Full Test Results (1 Failed · 31 Passed · 22 Skipped) |
Event Timeline
src/lint/linter/ArcanistAnsibleLintLinter.php | ||
---|---|---|
13–15 | Prefer to write this as pht('Uses `%s` to check Ansible playbooks for practices and behaviour that could potentially be improved.', 'ansible-lint'). Also, use US English (so "behavior" instead of "behaviour"). | |
19 | These are conventionally uppercase, so perhaps ANSIBLE? | |
30–34 | Remove commented-out code. | |
36–38 | Prefer to write this as pht('Install ansible-lint using `%s`.', 'pip install ansible-lint'). | |
40–42 | This is the default implementation, don't bother implementing this explicitly. | |
45–54 | Drop this. | |
63 | Stray debugging code? | |
70–76 | This pull request has been merged, so presumably this code can be activated now? | |
81 | Don't set a character offset if it's wrong. | |
86–87 | Remove commented out code | |
88 | Prefer to use getLintMessageSeverity so that the severity is customizable. |
Thanks for the feedback -- and apologies for the delay in responding, the notification email got stuck in one of my spam filters.