mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-22 00:03:16 +01:00
fix: tell Ansible about the idempotency of this task
This shell command doesn't change state on the system, therefore it is safe to set `changed_when` to `false`, and we can also set `check_mode` to `false` here to allow execution when run in check mode.
This commit is contained in:
parent
7983a7c85f
commit
aa786b1b1d
@ -9,6 +9,8 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
df -Ph / | awk 'NR==2 {print $5}'
|
df -Ph / | awk 'NR==2 {print $5}'
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
changed_when: false
|
||||||
|
check_mode: false
|
||||||
register: disk_usage
|
register: disk_usage
|
||||||
|
|
||||||
# - name: Send discord message when disk space is over 80%
|
# - name: Send discord message when disk space is over 80%
|
||||||
|
Loading…
Reference in New Issue
Block a user