Commit Graph

15 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d88998cd68 Bump ansible-lint and ansible version
ansible-lint 5.0.9 has merged our NoLogPasswordRule [1]
APTRepositoryCacheUpdateRule is not relevant since
ansible fix has been merged for several years now.
Also ansible-lint provides yamllint check.

This means, we shouldn't really carry custom lint
rules and can jsut use upstream ones.

We also update ansible and collections version to
match with the integrated repo.

[1] 8bef056d69

Change-Id: Ie85d6d0a17849bbc665a7f49644c38b5f6a96bb2
2021-05-19 18:25:57 +00:00
Jonathan Rosser cef65a6390 Update ansible-lint==4.3.5, flake8==3.8.3, bashate>=0.5.1
Correct lint errors that arise from these version updates.

Change-Id: I3216032b0d383ca6d4f6304c92151ce12dc5e114
2020-09-30 11:24:29 +00:00
Jean-Philippe Evrard 2d924b773d Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: Ida90a5a717adaf07ebf2ee6f04136fe920cfe46b
2018-07-12 16:44:20 +02:00
Jean-Philippe Evrard c00ecb858d Add a rule to prevent passwords to be logged
Lint rule to make sure no module argument looking like "password"
will get logged.

Change-Id: I180b77faf7aaab57d1c48fc993e43f08c4fb16f6
Closes-Bug: #1760878
2018-04-11 14:48:19 +00:00
git-harry cb435cea45 Add tests for APTRepositoryCacheUpdateRule
The custom ansible-lint rule APTRepositoryCacheUpdateRule was added in
67bfc90703, this change adds tests to
validate its functionality.

Change-Id: Ie0642cc41c016fc016b2bc6fc6d04b6afdf2be2c
Partial-bug: 1750656
2018-03-09 10:29:00 +00:00
git-harry 67bfc90703 Add ansible-lint rule for apt_repository
This rule is designed to prevent the Ansible module `apt_repository`
from being used to update the APT cache. There is a bug [1] in
`apt_repository` that prevents cache updates from being performed
whenever the module is retried. If the cache update fails at the first
attempt, it is skipped on the subsequent attempt of the task causing the
task to always complete successfully. Until this bug is addressed this
rule should prevent it from being introduced into OpenStack-Ansible.

Partial-bug: 1750656

[1] https://github.com/ansible/ansible/issues/36605

Change-Id: If440ce129c31fb4e62a8e0ac5094195f4d4d7167
2018-02-24 20:27:16 +00:00
Nguyen Hung Phuong 23d531ed04 Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines
they recommend to import only modules. [1]: "Do not import objects, only modules".

[1] https://docs.openstack.org/hacking/0.10.3/

Change-Id: I55ec09ba2977a973d384d6387958ec0972f581ec
2018-01-31 09:17:45 +07:00
Major Hayden eb3647a803 Revert "Add linter for passing pkgs as list"
This reverts commit 580aa54b98.

Change-Id: I20a240792d1a73c21b4d36b3c3c51c9c75f81e31
2017-10-13 12:43:03 +00:00
Major Hayden 580aa54b98
Add linter for passing pkgs as list
This patch adds a new linter that ensures packages are being
passed as a list rather than using with_items. It also adds a
test for the new linter and adds the test to the existing linter
CI job script.

Change-Id: Iffd7284fb1c7cc41df2a4e271821e51bb274c3a3
2017-09-20 08:36:15 -05:00
Major Hayden 0afd714e69 Revert "Add linter for passing pkgs as list"
This reverts commit 6d5de06fde.

Change-Id: I0091ccacceaecbdd0c8a3eb9ff211c4a93e7ea89
2017-08-10 15:55:17 +00:00
Jenkins 168dba6ead Merge "Add linter for passing pkgs as list" 2017-08-09 18:41:37 +00:00
Major Hayden 6d5de06fde
Add linter for passing pkgs as list
This patch adds a new linter that ensures packages are being
passed as a list rather than using with_items. It also adds a
test for the new linter and adds the test to the existing linter
CI job script.

Change-Id: Iffd7284fb1c7cc41df2a4e271821e51bb274c3a2
Signed-off-by: Major Hayden <major@mhtx.net>
2017-08-07 11:04:26 -05:00
Major Hayden 011e6f9634
Fix spelling error in linter
Change-Id: I2db040a0c257376e7d12742abacd467d7d83e575
2017-08-04 14:16:28 -05:00
ZhongShengping e2d3ab20bd Update URLs in documents according to document migration
Change-Id: I700e3ee24e34695540a341297c7a2de342b0ead7
2017-07-14 10:46:34 +08:00
Nish Patwa 7a576b2e8b Custom ansible playbooks checker using linter
Added custom style rules checker that checks whether the
playbooks follow YAML dictionary format or not.

Guidelines for writing Ansible playbooks is located here:
http://docs.openstack.org/developer/openstack-ansible/
developer-docs/contribute.html#ansible-style-guide

Change-Id: I9ad0d90017a0ce38f97dcbd43cbe8c1c13f185ed
Closes-Bug: 1629033
2016-10-07 20:49:14 +00:00