I have played arouind a bit and came up with this. Maybe it will help:

- hosts: localhost
  sudo: true
  tasks:

    - name: Create file
      file: path=/testfile state=touch

    - name: Get mtime
      stat: path=/testfile
      register: testfile

    - name: wait till there have been no changes to the file for 10 seconds
      debug: msg="Not yet"
      register: result
      until: "{{lookup('pipe', 'date +%s')}}-testfile.stat.mtime >=10"
      delay: 3
      retries: 10
      ignore_errors: true

    - debug: var=result

-- 
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/1219f19d-1909-465d-9774-9f2d7d703fd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to