10 Commits

Author SHA1 Message Date
Michal Nasiadka
b6c68e2bb4 Skip ansible-lint fqcn for module actions and role-name
Add noqa for:
Object of type PosixPath is not JSON serializable

Change-Id: Id6ef88bb8cd16120bf31da679d1129d99f4b9fd8
2022-10-12 10:02:52 +02:00
Marcin Juszkiewicz
387de84520 ansible-lint: cleanup our skip list
removed:
- 701 [galaxy_info missing] is no longer emited
- 602 [empty string compare] is now opt-in
- 208 [permissions not mentioned] is no longer emited
- 106 [role name] is no longer emited

renamed from number to role name:
- 503 [no-handler]
- 301 [no-changed-when]

Change-Id: I8b059d87c94499decbd9b115ef2cde033aa88fbd
2022-09-26 10:18:08 +00:00
Pierre Riteau
e890f161ed CI: allow Jinja templating anywhere inside task and play names
With the release of ansible-lint 6.7.0, the openstack-tox-linters job
started failing with these errors:

    WARNING  Listing 30 violation(s) that are fatal
    ansible/roles/ceilometer/tasks/config.yml:66: name: Jinja templates should only be at the end of 'name' (name[template])
    [...]

Add this new check to skip_list for now.

Change-Id: Ia82a88ee3b9bb6a3cb09f09c6568d1914ee2592d
2022-09-26 10:16:53 +02:00
Dr. Jens Harbott
dbce56b371 Bump ansible-lint version to 6.*
Add fqcn-builtins to the skip list for now, we will watch how the
discussion about this evolves and defer updating all code according to
that [0].

[0] https://github.com/ansible/ansible-lint/issues/2050

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I6dcdec4f029b87bad41530ad45d285909c8351f7
2022-04-12 08:56:25 +02:00
Michal Nasiadka
fcdba9e850 CI: Fix new ansible-lint failures
Change-Id: I27b0e42fba93a35c6d878d108bf1e7fdebc9e3db
2022-02-15 07:42:53 +00:00
Michał Nasiadka
6ef4d039e1 CI: Fix yamllint comments-indentation in .ansible-lint
Change-Id: Ie3ca5526e2af30db06631e7c215fe2db13c92f2f
2021-03-19 12:08:20 +01:00
Mark Goddard
32f1b6cf56 ansible-lint: add unnamed-task to the skip list
The 5.0.3 release of ansible-lint makes the linters job fail, due to the
addition of an unnamed-task rule. We have quite a large number of
unnamed tasks, typically include_tasks or include_role. We may want to
address this at some point, but not right now.

Change-Id: I4ee706fe2463d62e4e16412117d4373748ea43e3
2021-03-11 09:10:16 +00:00
Radosław Piliszek
ea91edcbae [TrivialFix] Clean a recent comment
Change-Id: Ic58a27e517004768433a1e793d4d8e90e2c3383a
2020-08-21 12:31:43 +02:00
Michal Nasiadka
88c53da22f Fix ansible-lint after upgrade to 4.3.1
Change-Id: I3a31c74608b48919c1563bac88313a8c4219dedc
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-08-21 10:06:06 +00:00
Michal Nasiadka
d8f31e0a5e CI: Add ansible-lint to tox
* Reworked tox pep8 into linters job, that runs:
  - pep8
  - bandit
  - bashate
  - doc8
  - yamllint
  - ansible-lint (validate-all-files.py + ansible-lint)

* Skip E701 - missing galaxy_info in meta and E602 see [1].
* Skip E301 and E503 - followup later in a separate change
* Added ansible-role-jobs to zuul.d/project.yaml which will run
  openstack-tox-linters job in check queue
* Fixed remaining style issue
* Made tox and docs reference the new env for linters
* Dropped pype environment (not supported)

[1]: https://github.com/ansible/ansible-lint/issues/457

Change-Id: I494b4b151804aac8173120e6c6e42bc2fdb00234
2020-05-17 17:02:38 +02:00