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

Fix Nginx includes for Ansible 2.0 #473

Merged
merged 1 commit into from
Feb 7, 2016

Conversation

fullyint
Copy link
Contributor

  1. In Ansible 1.9 the template task's cwd was the directory of the task file. In Ansible 2.0, it is the directory of the role. This PR enables the template task to accommodate either by using the role_path variable—an absolute path—instead of a relative path.

  2. Ansible 2.0 changes backreference escaping for the regex_replace filter, needing only 2 backslashes instead of 4, and in fact has a problem with 4. (Discussion at ansible/ansible#13426.) This PR uses a ternary filter to give two vs. four backslashes depending on Ansible version.

@remailednet
Copy link

Since ansible now requires 2.0.0.2 could the extra logic for deciding on the backslashes be dropped?

@fullyint
Copy link
Contributor Author

fullyint commented Feb 6, 2016

right on @remailednet
I've removed the ternary that accommodated Ansible 1.9. This is thankfully much simpler now.

swalkinshaw added a commit that referenced this pull request Feb 7, 2016
Fix Nginx includes for Ansible 2.0
@swalkinshaw swalkinshaw merged commit f1bd82c into roots:master Feb 7, 2016
@fullyint fullyint deleted the nginx-includes branch February 7, 2016 04:53
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.

3 participants