moved file around

This commit is contained in:
Justin committed 2025-04-14 14:13:11 -05:00
1 parent bf94693d29
commit 659d653e90
13 files changed
+580 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
---
- name: Check disk space
hosts: "all"
tasks:
- name: Check disk space available
ansible.builtin.shell:
cmd: |
set -euo pipefail
df -Ph / | awk 'NR==2 {print $5}'
executable: /bin/bash
changed_when: false
check_mode: false
register: disk_usage
- name: Diskspace is over 80%
ansible.builtin.debug:
msg: "Disk is over 80%"
when: disk_usage.stdout[:-1]|int>80
- name: Posting
ansible.builtin.command:
cmd: 'curl -d "Disk space on {{ inventory_hostname }} is above 80%!" ntfy.ki5bhv.com/server'
when: disk_usage.stdout[:-1]|int>80