Ansible Date struggle

14 views
Skip to first unread message

ns27...@gmail.com

unread,
Feb 6, 2017, 9:41:47 AM2/6/17
to Ansible Project
Hi I am new to Ansible .

I am some issues working with dates .I want to get the difference between two dates in seconds  or minutes .

I created two ec2 instance and was able to retrieve the launch times using below 

name: launch time and date of EVC and ansible date 
  debug:
     var: item.launch_time
     with_items: "{{ ec2_facts.instances }}"

also i was able to get the ansible date using .
- name: launch time and date of EVC and ansible date 
   debug:
  date: ansible_date_time.iso8601_micro.date


What i am not able to do is store these variables in a date variable and then subtract them and get this difference .

Could you guys help me ?

Regards,
NS
Reply all
Reply to author
Forward
0 new messages