On 24. juli 2017 22:40, JS wrote:
Hi Kai, Brian

Some fantastic suggestions there!

@Kai your suggestion is greater however, the output is in the format:
Mon 24 Jul 21:23:08 BST 2017

I was looking for it to be in the format: 2017-07-24_02:26:08 - as I will
be using that to create the directory names.

That's easy to fix.

"{{ lookup('pipe', 'date +%F_%T') }}"

Check out "man date" to learn more about date's capabilities.


--
Kai Stian Olstad

--
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/460823b2-8e46-5958-f5c6-a3a957198b4e%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to