#
# Simple playbook to gather install dates from all instances
#

- name: List out when machines were installed
  hosts: test
  gather_facts: false

  tasks:

  - name: findmnt and find out what fs it is
    command: findmnt -n -o SOURCE /
    register: rootdev

  - name: find out when root fs was made
    command: lvs --noheadings -o lv_time {{ rootdev.stdout }}
    register: rootdevtime

  - local_action: command echo item
    with_items: "{{ rootdevtime.stdout }} {{ inventory_hostname }}"
