From ef482afba30deb79b9b5696f4dd8161333ef3afb Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 28 Dec 2023 14:36:29 +0100 Subject: [PATCH] Add the skip block --- scripts/reboot-all-machines | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/reboot-all-machines b/scripts/reboot-all-machines index 08e5759..01adf26 100755 --- a/scripts/reboot-all-machines +++ b/scripts/reboot-all-machines @@ -16,6 +16,10 @@ rsa_key="$HOME/.nixos/secrets/ssh_keys/ansible/ansible.key" export NIX_SSHOPTS="-t -i $rsa_key" for host in "${hosts[@]}"; do + # Check if the host is in the skip list + if [[ " ${skip[*]} " =~ " ${host} " ]]; then + continue + fi fqdn="$host.2li.local" echo $fqdn ssh -i $rsa_key $fqdn 'sudo reboot'