This updates to ansible-lint 6. Some prior changes have updated for
the bulk of the rules, a couple of noqa points are added here. Some
updates to the skipped rules are added. This should have no
operational change, the only updates are cosmetic.
Change-Id: I165677bbb904f92292df00f7b9b27f8f3573aeb0
Fixes several rules with test-playbooks and remove path exclusions.
Since we introduced the progressive mode, exclusions are no longer
needed and not haivng them will assure newly added code follows
the same guidelines.
Change-Id: I0a72d34aff8cf23172e26c7f44e0f61571ec74b6
- bumps ansible-lint to 5.0
- updates our custom rules to make them compatible with 5.0
- replace custom module mocking with native ansible-lint ones
- remove custom call of ansible-playbook --syntax-check as now this
is done by ansible-lint
- assured molecule vars are hosted under a vars/ folder in order to
avoid confusing linter detection.
- replaced custom rule for loop var names in role as now this this an
optional core feature of the linter (see config)
- replaced custom rule no-same-owner with opt-in one (see config)
Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
Makes use of newer feature which produces failures only when current
commit is adding new violations, exiting ones being considered
as already known.
To prove it works, it also removes the E208 from warn, making it
an error. Still, the final linting result is a success because
these violations were already present before current commit.
Change-Id: Ia858f2a3e71d9634e9d90e890d82714105e8f8c9
As a first step towards minimizing code duplication between the
various upload-logs roles move the uplaod modules into a common role
upload-logs-base. For easier review common code will be consolidated
in a followup change.
The google and s3 variant missed the unicode fix that swift log upload
received. Add this to make to make the test cases work with the same
fixtures.
Change-Id: I2d4474ae1023c3f3e03faaa5b888e705ee2ed0bc
ansible-lint throws an undocumented error "E208 File permissions not
mentioned" that looks too aggressive, for example it complains IMHO
wrongly about:
roles/add-build-sshkey/tasks/remote-linux.yaml:1: [E208] File permissions not mentioned
roles/add-build-sshkey/tasks/remote-linux.yaml:14: [E208] File permissions not mentioned
roles/add-build-sshkey/tasks/remote-linux.yaml:20: [E208] File permissions not mentioned
roles/add-build-sshkey/tasks/remote-linux.yaml:27: [E208] File permissions not mentioned
Disable it for now until ansible-lint is fixed - and the real problems
in zuul-jobs are fixed.
https://github.com/ansible/ansible-lint/pull/949 fixes the false
positives. Once that is merged and a new release is out, we should
revert and fix the real problems.
Change-Id: I3e3978bbc9458ad79623d22969344fb46f5fee43
- Bumps linter and make use of its auto-detection
- Temporary skips linting test-playbooks/ to match previous behavior
- Documents skips in a way that makes it easy to maintain the rules
- Keeps linter config in standard location, so it can be loaded
regardless how is called.
Change-Id: Ic379c91fa9385473f6ec2af91e61953dc10c1f54
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles
It also updates existing roles to follow the policy.
Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f
ANSIBLE0012 is the old name, 301 is the new name for the lint rule.
Change conifguration to use new name.
Change-Id: I8e3148a54ec811308865882d79edc255d61cfff0
ansible-lint now supports settings in a file, including exclude_paths.
This lets us simplfy the ansible-lint command. Also, stop installing
zuul and just use a fake zuul_return and zuul_console
to fake out ansible-lint.
Change-Id: I1482a9ab915cec2d45695b60cdbeb93d58cb392c