Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. foreach (mountpoint in ansible_mounts)
  2. {
  3. if (mountpoint["mount"] == "/var" || mountpoint["mount"] == "/opt")
  4. {
  5. // do the check
  6. }
  7. }
  8.  
  9. - name: Ensure that free space on the tested volume is greater than 15%
  10. assert:
  11. that:
  12. - mount.size_available > mount.size_total|float * 0.15
  13. msg: Disk space has reached 85% threshold
  14. vars:
  15. mount: "{{ ansible_mounts | selectattr('mount','equalto',item.mount) | list | first }}"
  16. with_items:
  17. - "{{ ansible_mounts }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement