-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Package has retry rule #324
Conversation
Jinja2 should not be included in "when" lines. This produces a warning in Ansible 2.3+
Roles should be expanded to include the prohibition against the when clauses as well
I welcome this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is going to have to be made more generic. In modern ansible the 'package' action module is used, which then passes it to the 'apt' module in the case of a debian system. I think that this lint check should be applied to all package installs, and the check should verify against the 'apt' module (along with yum and others), and against the 'package' task too.
I agree this should test the package action plugin, instead of the apt module. But if it's too generic to consider the action plugin, this idea should be extended to the appropriate modules (at least yum and zypper) |
Apt operations are unreliable as they involve network access and remote servers. To mitigate potential failures, retries should be used. Also updates test_files_not_scanned_twice as the file scanned by that test now matches two rules.
5f2c048
to
e62faef
Compare
Extended to all the package modules, excluding a few that appear to be local only (eg dpkg, and apt_repository). |
Probably worth renaming the PR, and making sure it passes tests :) |
Failed job ran for 9 hours, with log output "null" https://api.travis-ci.org/v3/job/341984987/log.txt |
Closed and re-opened to retry tests. |
Fix minor bug in the test.
Enumerate all the valid modes that we expect to be able to detect and the invalid modes we expect to detect. Make the OctalPermissionsRule a lot more readable and remove a lot of bugs spotted while improving tests and making it readable!
Ansible 2.3+ allows variables to be encrypted *within* YAML files. Pass a default vault_password to the functions that parse YAML. Include a test to check this raises no exceptions under Ansible 2.3+
Include vault fixes and octal permissions changes
ansible-lint failed to detect tasks with an empty name field. This commit fixes the issue and adds some tests for it.
…name-field Fix TaskHasName check for tasks with an empty name field
Also, make options.skip_list a (frozen)set
add role dir with os.path.join so correct trailing slash is included
…not-parsed Fix task files included in roles not parsed
…rom-readme Remove matchblock as a match type in docs
`replace` module is often another good alternative for sed command
Fixes: ansible#337 Added a check in the _roles_children function if the children that are to be included came out of the dependencies. If the are from 'dependencies' we don't expect name or key Added testcases according to the possible notations of the dependencies in the meta/main.yml as stated here: https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html#dependencies
* PackageIsNotLatestRule: reformat and sort array * PackageIsNotLatestRule: add more modules apk, jenkins_plugin, jenkins_plugin, sorcery, win_chocolatey, yarn List obtained using `ag -l 'state: latest' ansible/lib/`
* update ids and tags, add doc generator * attempting to correct travis ci tox issues * added historic ids as tags, updated README, added test case
Use raw strings for regexes, and use `{` rather than `\{`
* Red Hat are now the maintainers * Bulk update to follow Ansible project guidelines * Thank willthames for his work * Detail DCO requirement * Link to IRC/Mailing lists * Tidy up markdown files
Closing and re-opening to trigger CI. |
* Fix double sudo rule output Signed-off-by: Andrew Crosby <[email protected]> * Added class to run tests from text, keeping test cases in one file Signed-off-by: Andrew Crosby <[email protected]>
* Add roadmap Signed-off-by: Andrew Crosby <[email protected]> * Updated roadmap Signed-off-by: Andrew Crosby <[email protected]>
…e#390) * Fix running with role path containing single or multiple dirs Signed-off-by: Andrew Crosby <[email protected]> * Changed fix to check for role files inside rolepath dir Signed-off-by: Andrew Crosby <[email protected]> * Add test case for role path deeper than 2 dirs Signed-off-by: Andrew Crosby <[email protected]>
* Additional default rules for ansible-lint Signed-off-by: Andrew Crosby <[email protected]> * Removed 3 rules Signed-off-by: Andrew Crosby <[email protected]> * Added connection: local to TaskNoLocalAction rule Signed-off-by: Andrew Crosby <[email protected]> * Moved ShellAltPatch check to CommandsInsteadOfModulesRule Signed-off-by: Andrew Crosby <[email protected]> * Removed TaskManyArgs rule Signed-off-by: Andrew Crosby <[email protected]> * Updated ids to make sequential Signed-off-by: Andrew Crosby <[email protected]> * Changed LineTooLongRule to 120 chars Signed-off-by: Andrew Crosby <[email protected]> * Added test cases Signed-off-by: Andrew Crosby <[email protected]> * Improved rule check if role or not Signed-off-by: Andrew Crosby <[email protected]> * Added .yaml in extension check Signed-off-by: Andrew Crosby <[email protected]> * Edited local_action suggestion Signed-off-by: Andrew Crosby <[email protected]> * Removed 'company' from required meta fields Signed-off-by: Andrew Crosby <[email protected]>
…acter before evaluation (ansible#323)
Apt operations are unreliable as they involve network access and remote servers. To mitigate potential failures, retries should be used. Also updates test_files_not_scanned_twice as the file scanned by that test now matches two rules.
Changed id and tags Re-ran and sorted generated module list Refactored test case to be in one file Signed-off-by: Andrew Crosby <[email protected]>
My refactoring of this PR pushed a long commit history, apologies for that, so I have incorporated and merged the refactored edits in #400 - thanks for the contribution! Refactored edits:
|
Apt operations are unreliable as they involve network access and
remote servers. To mitigate potential failures, retries should be used.