diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-01-31 14:04:25 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2025-01-31 14:05:36 +0100 |
commit | 16fc7a62c6873cd0c06a63bc7b37247534f0c72e (patch) | |
tree | 3536933d7c380778467865f565ea9439f9c7f9bf /sbin/itzks-puppetserver-detect-broken-hosts | |
parent | fe4dc3a1773dab09d4f66a9e4acf83846bb8a823 (diff) | |
download | itzks-systems-16fc7a62c6873cd0c06a63bc7b37247534f0c72e.tar.gz itzks-systems-16fc7a62c6873cd0c06a63bc7b37247534f0c72e.tar.bz2 itzks-systems-16fc7a62c6873cd0c06a63bc7b37247534f0c72e.zip |
sbin/itzks-puppetserver-detect-broken-hosts: Add support for ignoring already repaired puppet clients.
Diffstat (limited to 'sbin/itzks-puppetserver-detect-broken-hosts')
-rwxr-xr-x | sbin/itzks-puppetserver-detect-broken-hosts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/itzks-puppetserver-detect-broken-hosts b/sbin/itzks-puppetserver-detect-broken-hosts index ad13ea7..a632c52 100755 --- a/sbin/itzks-puppetserver-detect-broken-hosts +++ b/sbin/itzks-puppetserver-detect-broken-hosts @@ -26,6 +26,11 @@ usage() { exit 1 } +ignore_repaired_hosts="" +if [ -e /etc/debian-edu/itzks-puppetserver-fixed-puppet-hosts ]; then + ignore_repaired_hosts=$(cat /etc/debian-edu/itzks-puppetserver-fixed-puppet-hosts | grep -v -E "^#.*") +fi + for arg in "$@"; do case "${arg}" in -t|--today) @@ -66,6 +71,10 @@ for ip in ${iplist_with_puppeterrors}; do continue fi + if [ -n "${fqdn}" ] && echo "${ignore_repaired_hosts}" | grep -q "${fqdn}"; then + continue + fi + if [[ -n "${INCLUDE}" ]] && ! echo "${ip} ${fqdn}" | grep -q -E "${INCLUDE}"; then continue fi |