specify the ssh key
This commit is contained in:
parent
37ce01ac12
commit
67bf564c89
|
@ -6,10 +6,13 @@ hosts = [
|
|||
"nixos-test-vm",
|
||||
]
|
||||
|
||||
update_command = 'tmux new -s updates "cd ~/.nixos && git pull && sudo nixos-rebuild -j auto switch || bash;"'
|
||||
rsa_key = "~/.nixos/secrets/ssh_keys/ansible/ansible.key"
|
||||
|
||||
for host in hosts:
|
||||
fqdn = "{}.2li.local".format(host)
|
||||
print(fqdn)
|
||||
print("-" * len(fqdn))
|
||||
ssh -t @(fqdn) 'tmux new -s updates "cd ~/.nixos && git pull && sudo nixos-rebuild -j auto switch || bash;"'
|
||||
ssh -i @(rsa_key) -t @(fqdn) @(update_command)
|
||||
print("")
|
||||
print("")
|
||||
|
|
Loading…
Reference in New Issue