I generate a report using a Jinja template file from one of my playbooks and mail that file to several users. In it, I am putting the current date and time as follows:
Date generated: {{ now(false, ‘%m/%d/%Y %I:%M:%S’) }}
I generate a report using a Jinja template file from one of my playbooks and mail that file to several users. In it, I am putting the current date and time as follows:
Date generated: {{ now(false, ‘%m/%d/%Y %I:%M:%S’) }}
I think now() is naive, i.e. it does not know about time zones.
If you need time zones, then I'd give 'ansible_date_time' a try.
Thank you! That worked very well.
Harry