Comments (4)
Yes, that's a standard feature.
From the README.md (it could probably be clearer):
To add standards that are advisory, don't set the version. These will cause a message to be displayed but won't constitute a failure.
Hopefully that helps, let me know if you need any more info
from ansible-review.
Yes, I think it definitely needs to be made more clear on the docs. tbh, I am still not fully understanding. So there are 2 versions - the standards version and the version that is inside each rule defined in the standards file? if the standards version is greater than the rule version then it becomes a warning? Perhaps you can give some better example and explanation?
from ansible-review.
I talk a bit about versioned standards at https://willthames.github.io/2016/06/28/announcing-ansible-review.html
This means that you can update your standards without roles developed against earlier standards failing.
from ansible-review.
Thanks @willthames, I think I understand now. We generally don't set the Standards in our playbooks because we always want to apply the latest version of the lint rules. So in our standards.py
we set the latest version to 1.0
here:
# Update this every time standards version increase
latest_version = Standard(dict(
check=noop,
name="No-op check to ensure latest standards version is set",
version="1.0",
types=[]
))
And then, the rules we want to FAIL in our standards.py
we make sure they have version
set as we do here:
tasks_are_named = Standard(dict(
name="Tasks and handlers must be named",
check=lintcheck('ANSIBLE0011'),
version="0.0",
types=["playbook", "task", "handler"],
))
Then when the playbook or task file breaks that rule, a FAIL will occur for that specific rule. If we want the rule to only be "suggestive" and warn developers, we remove the version
from the above rule.
from ansible-review.
Related Issues (20)
- Octal Permission representation HOT 1
- Add custom ID to Standard
- Bug using get_action_tasks
- Classification of files as group_vars not working correctly HOT 3
- Python 3 support HOT 3
- AttributeError: 'InventoryManager' object has no attribute 'get_group' HOT 2
- Unable to Load Variables from Directories within defaults/main HOT 1
- Broken PyPI metadata and related problems HOT 3
- Embrace parseable output to stdout HOT 4
- Broken EXTRA0008 check HOT 3
- ansible review with git diff sometimes aborts on non yaml files, non yaml should be skipped
- Stacktrace when providing custom config file using ansible-review 0.14.0rc1 HOT 1
- Inconsistent output in pre-commit hook compared to other hooks HOT 1
- Support for pre-commit hook `verbose` option
- Inconsistent output from ansible-review for some rules
- release 0.14rc2 produces stack trace when trying to read vaulted file
- ansible-review v0.14.0rc2 produces stacktrace when checking azure_rm.yml inventory plugin HOT 1
- Stack trace/error upon finding vault string in playbook vars HOT 1
- cannot import name 'default_rulesdir' from 'ansiblelint' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-review.