Compare commits

..

2 Commits

Author SHA1 Message Date
37da57bfcc fixed "numfmt: invalid unit size" 2023-12-24 18:42:20 +03:00
668ac8e0ea fixed yum return code handling 2023-12-24 18:41:59 +03:00
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
---
- name: update repo
shell: yum check-update
register: update_exists
failed_when: update_exists.rc != 100 and update_exists.rc != 0
args:
warn: false

View File

@ -65,7 +65,7 @@ fi
MEM=$(grep /proc/meminfo \
-e 'MemTotal' -e 'MemAvailable' -e 'MemFree' \
-e 'SwapTotal' -e 'SwapFree' \
| numfmt --field 2 --from-unit=Ki --to=iec | sed 's/ kB//g')
| numfmt --field 2 --to=iec | sed 's/M/G/g' | sed 's/ kB//g')
if [ -n "${MEM}" ]; then
TXT_MSG=$(cat <<-END
${TXT_MSG}