In my group_vars folder , I have a file which has the following
scheduletime: 2016-09-01 08:41:15
stime: "{{lookup('pipe','date +%Y-%m-%dT%H:%M:%SZ -d '+{{ scheduletime
}}+'')}}"
I want to provide human readable time via scheduletime and then convert it
into iso 8601 format
the following works on linux: date +%Y-%m-%dT%H:%M:%SZ -d "2016-09-01
08:41:15"
tryin to represent the same in ansible group_vars.
fatal: [localhost] => Failed to template {{stime}}: Failed to template
{{lookup('pipe','date +%Y-%m-%dT%H:%M:%SZ -d '+{{ scheduletime }}+'')}}:
template error while templating string: expected token ':', got '}'
I have tried many combinations of quotes, double quotes, but cannot seem to
get it to work.
--
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/c4126cd4-73dc-41b4-9777-901680d03a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.