Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (mountpoint in ansible_mounts)
- {
- if (mountpoint["mount"] == "/var" || mountpoint["mount"] == "/opt")
- {
- // do the check
- }
- }
- - name: Ensure that free space on the tested volume is greater than 15%
- assert:
- that:
- - mount.size_available > mount.size_total|float * 0.15
- msg: Disk space has reached 85% threshold
- vars:
- mount: "{{ ansible_mounts | selectattr('mount','equalto',item.mount) | list | first }}"
- with_items:
- - "{{ ansible_mounts }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement