playbookquestion

29 views
Skip to first unread message

Отель Элеон

unread,
Nov 14, 2017, 3:28:38 AM11/14/17
to Ansible Project

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!!!!

Отель Элеон

unread,
Nov 14, 2017, 3:28:56 AM11/14/17
to Ansible Project


вторник, 14 ноября 2017 г., 14:28:38 UTC+6 пользователь Отель Элеон написал:

Brian Coca

unread,
Nov 15, 2017, 11:11:31 AM11/15/17
to Ansible Project
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}}"



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages