What is the way to conditionally run task based on filesystem check on 
remote system?
I want something like this, but of course it doesn't work:

  tasks:
  - name: cleaning up the logs that exceed 5Mb
    command: cat /dev/null > {{ item }}
    when: filesize(/var/log/apache2/access.log) > 5Mb


-- 
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/85131775-cc9d-45b4-abc3-57c2851b79be%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to