Member-only story
Using Date, Time, and Timestamp in Ansible Playbook — Ansible Tip and Tricks
How to use Date, Time, and Timestamp in ISO 8601 format in Ansible Playbook.
4 min readMay 19, 2022
How to Use Date, Time, and Timestamp in Ansible Playbook.
I’m going to show you a live demo and some simple Ansible code.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Using Date, Time, and Timestamp in Ansible Playbook
"ansible_date_time": {
"date": "2022-05-18",
"day": "18",
"epoch": "1652887408",
"epoch_int": "1652887408",
"hour": "15",
"iso8601": "2022-05-18T15:23:28Z",
"iso8601_basic": "20220518T152328995863",
"iso8601_basic_short": "20220518T152328",
"iso8601_micro": "2022-05-18T15:23:28.995863Z",
"minute": "23",
"month": "05",
"second": "28",
"time": "15:23:28",
"tz": "UTC",
"tz_dst": "UTC",
"tz_offset": "+0000",
"weekday": "Wednesday",
"weekday_number": "3",
"weeknumber": "20",
"year": "2022"