Skip to content
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

Fixes for Ansible 2.0 #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fixes for Ansible 2.0 #38

wants to merge 3 commits into from

Conversation

x89
Copy link

@x89 x89 commented Jan 20, 2016

No description provided.

@maschmann
Copy link
Collaborator

Main Problem ist: I'm not yet sure if I can incorporate the changes in a way to support both, ansible 2.0 and 1.9. Since we're using this deployment for our production system here, and are not able to update 2.0 for a while, this is somewhat... challenging ;-)

@maschmann maschmann closed this Jan 28, 2016
@maschmann maschmann reopened this Jan 28, 2016
@x89
Copy link
Author

x89 commented Feb 9, 2016

@maschmann I tried to make sure it was backwards compatible!

There are a few more changes for things I don't use in my own production I believe, also let me update the changes because | exists is required to prevent erroring out!

@x89
Copy link
Author

x89 commented Feb 9, 2016

Either way you need to get it working for 2.0 now it's the main release ;)

Let me know if I can help!

@maschmann
Copy link
Collaborator

Hi,
I first had to resolve the folder structure problems for the change from sf 2.8 -> 3.x
Now I'll need to build a test environment for ansible 2 here, since we are not able to use it yet, environment-wise. That's also true for lots of my colleagues, since Ansible 2 has some breaking changes and early adopting is not the common path when using Provisioning in a production environment :-)

@maschmann
Copy link
Collaborator

I've had a look into the include changes: It is possible to do this in the way you've implemented id, but just checking the included task variable to be not empty seems to be a bad idea, since it breaks if e.g. the null value handling of ansible changes. Would be better to use a file stat instead?

//edit
As far as I've seen there's no jinja "exists" filter. This then has to be done with file stat.
I'll add the stat in 00-facts and set a include file variable to True/False if file is present.
btw: good idea to name the includes and add a "when". Overread that the conditional inclusion works with tasks - thought it didn't work, since playbooks couldn't be included conditionally with <2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants