diff --git a/autoupdate.yml b/autoupdate.yml index 9ce9fd5..9dd2748 100644 --- a/autoupdate.yml +++ b/autoupdate.yml @@ -71,8 +71,8 @@ marker: "# {mark} ANSIBLE MANAGED BLOCK" block: | [ -e /root/server-$(hostname -s)/$(hostname -s).sh ] && bash -ex /root/server-$(hostname -s)/$(hostname -s).sh >/var/log/server-$(hostname -s)-update.log 2>&1 - g_echo_warn "$(egrep -B1 "^changed" /var/log/server-$(hostname -s)-update.log)" - g_echo_error "$(egrep -q -B1 -i "^error|^failed" /var/log/server-$(hostname -s)-update.log && cat /var/log/server-$(hostname -s)-update.log)" + g_echo_warn "$(egrep -B1 "^changed" /var/log/server-$(g_echo_error "$(egrep -q -B1 -i "^error|^fatal" /var/log/server-$(hostname -s)-update.log && cat /var/log/server-$(hostname -s)-update.log)"hostname -s)-update.log)" + backup: yes validate: /bin/bash -n %s