Skip to content

Instantly share code, notes, and snippets.

@Wicaeed
Created July 31, 2019 20:15
Show Gist options
  • Save Wicaeed/e5213f395d7e1ce4b258787d827497db to your computer and use it in GitHub Desktop.
Save Wicaeed/e5213f395d7e1ce4b258787d827497db to your computer and use it in GitHub Desktop.
assert
- name: get free disk capacity for mountpoint
assert:
that:
- not {{ item.mount == '/usr/local' and ( item.size_available < (free_disk_capacity_limit|int * 1024) ) }}
- not {{ item.mount == '/' and ( item.size_available < free_disk_capacity_limit|int ) }}
quiet: true
with_items: "{{ ansible_mounts }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment