Hi all,

The template module supports the --check and --diff options so you can see
what changes would be made to a file without actually making the live
change. For example, if I use a simple template to insert "hello world" in
a file, I might get output that looks like:


TASK [template]
****************************************************************
changed: [localhost]
--- before
+++ after: dynamically generated
@@ -0,0 +1 @@
+hello world


However, while Ansible is clearly generating the templated version of the
file, I can't find a way to keep around the templated version of the file
after the fact. We'd very much like to be able to save the templated file
for later inspection, without having to install the result on a live
system. (This is useful for such things as debugging very complex
templates; feeding a file into a sanity checker for the given service; etc.)

I tried using ANSIBLE_KEEP_REMOTE_FILES, but this just keeps a python
script that presumably includes the template in its ZIPDATA, rather than
saving a cleartext version of the templated file.

Can anyone suggest a way to save these templated files? I'd be happy to
hear that I'm just overlooking some obvious option or flag. ;)

Thanks,
Adam

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAM2q2A4%2BtL4SE8sZ4mQEfd4KZHn8Ff7rCmpx73VoCkA7HRSndw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to