Add the skip block

This commit is contained in:
Andreas Zweili 2023-12-28 14:36:29 +01:00
parent a1800a7c83
commit ef482afba3
1 changed files with 4 additions and 0 deletions

View File

@ -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'