-
Notifications
You must be signed in to change notification settings - Fork 80
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 Ansible linting under Ansible 2.x #757
Conversation
👍 |
Rebase please |
|
||
[testenv:ansible2-lint] | ||
commands = | ||
{toxinidir}/scripts/linting-ansible.sh |
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.
This can be (more simply)
commands = {[testenv:ansible2-lint]commands}
That way if one of them changes, they both change automatically.
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.
Yep, that's worth doing.
I'm 👍 once the gate passes |
Added one last change, and I think I'm satisfied now. I marked the job as an ignored failure so travis won't make the build red just because of an ansible 2.0 linting error. |
I'm +0 on allowing ansible 2.0 to fail. If we already have compatibility we should just enforce it. I don't see a downside to not enforcing it. |
I agree with @sigmavirus24. If we're already achieved it, and that's where we're going, let's enforce now. WE can always shut it off in the rare circumstance we must do something in 1.9 in a 2.x incompatible way. |
This commit adds a new tox environment for linting playbooks and roles
against Ansible 2.x. It also modifies the linting-ansible.sh script so
that it is compatible with both the 1.x and 2.x series.
To support easy removal of the job in the future, the version of ansible used
is implemented as an environment variable that is substituted by tox. Thus,
making ansible 2.x the default in the future is as simple as removing
the line in .travis.yml that sets the environment variable to >=2.0 and
updating the default value on the requirement in tox.ini.
Also, the requirements files were changed from referencing the
openstack-ansible submodule to using the test-requirements.txt file
in-tree.
This commit is not intended to provide full Ansible 2.x support. Rather,
it is to serve as an early warning system so that the playbooks and
roles aren't written in an incompatible manner prior to actually
switching.
Fixes: #754
Fair enough. I've pushed new changes that keep the ansible 2 job voting based on feedback. |
👍 I somehow doubt that the ceph failure is related to this. |
recheck tests must pass, no exceptions |
recheck - failed on tempest/neutronportnotfound |
yay, tests passed 👍 |
Add Ansible linting under Ansible 2.x
This commit adds a new tox environment for linting playbooks and roles
against Ansible 2.x. It also modifies the linting-ansible.sh script so
that it is compatible with both the 1.x and 2.x series.
This commit is not intended to provide full Ansible 2.x support. Rather,
it is to serve as an early warning system so that the playbooks and
roles aren't written in an incompatible manner prior to actually
switching.
Fixes: #754