Add the skip block
This commit is contained in:
parent
a1800a7c83
commit
ef482afba3
|
@ -16,6 +16,10 @@ rsa_key="$HOME/.nixos/secrets/ssh_keys/ansible/ansible.key"
|
||||||
export NIX_SSHOPTS="-t -i $rsa_key"
|
export NIX_SSHOPTS="-t -i $rsa_key"
|
||||||
|
|
||||||
for host in "${hosts[@]}"; do
|
for host in "${hosts[@]}"; do
|
||||||
|
# Check if the host is in the skip list
|
||||||
|
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
fqdn="$host.2li.local"
|
fqdn="$host.2li.local"
|
||||||
echo $fqdn
|
echo $fqdn
|
||||||
ssh -i $rsa_key $fqdn 'sudo reboot'
|
ssh -i $rsa_key $fqdn 'sudo reboot'
|
||||||
|
|
Loading…
Reference in New Issue