Thanks, Brian, that was all very helpful. I look forward to the fix hitting 
release.

I'm looking at those variables because of the documented implications of 
the {file} part of ansible_managed being absolute, what was said in 
https://github.com/ansible/ansible/pull/15559 about ansible_managed maybe 
being removed, and how much I like comments in files which explain which 
template was used to create them. Whilst looking at making my own variable 
to use in place of ansible_managed I've come up with

  {{ template_fullpath | regex_replace('^.*/roles/(.*)','\\1') }}

which comes out as something like "foo/templates/blah.txt". (Which is 
somewhat inelegant but the only way I could think of to deal with there 
being an unpredictable number of directories above the one called "roles".)


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ea162d6c-bcdc-48dd-a279-c5aa0fad409an%40googlegroups.com.

Reply via email to