Hello guys, i’m really want to recipe, for write playbook which will be:
- check disk space on 10 servers
-if the disk space is exceed 80 % in / partition, the information about this accident must reported to my email
thank you guys!!!
Hello guys, i’m really want to recipe, for write playbook which will be:
something like this should work:
- hosts: groupof10
tasks:
- mail: subject='less than 20% root' ....
when: (root.size_available / root.size_total) <= 0.20
vars:
root: "{{ansible_mounts|selectattr('mount', 'equalto', '/')|first}}"