date format

74 views
Skip to first unread message

KSS

unread,
Mar 24, 2014, 11:01:54 AM3/24/14
to ansible...@googlegroups.com
Hi,

I have a situation where I need to use the three letter abbreviation for the current month (i.e. Mar for March) rather than the numeric representation.

Besides using the shell or command module to register it as a variable. Is it possible to somehow get this directly in a jinja2 template or a vars file?

Timothy Appnel

unread,
Mar 24, 2014, 1:22:08 PM3/24/14
to ansible...@googlegroups.com, ansible...@googlegroups.com
Sounds like something Jinja2 can handle pretty easily.

http://stackoverflow.com/questions/4830535/python-how-do-i-format-a-date-in-jinja2

<tim/>

Sent from my iPhone

KSS

unread,
Mar 25, 2014, 3:48:31 AM3/25/14
to ansible...@googlegroups.com
Hi Tim, thanks for the reply. I've looked at that prior to posting. Unfortunately, I can't get it working.

Does anyone have an example showing me how to do this?
Reply all
Reply to author
Forward
0 new messages