vigir: store password in password store

This commit is contained in:
Nico Schottelius 2021-11-16 14:17:22 +01:00
parent 2d4fe86996
commit ee7a504bba
1 changed files with 3 additions and 4 deletions

View File

@ -19,10 +19,6 @@ vigir_hostname=vigir${id}
root_password=$(pwgen -1 32)
# Save for sending to user
# FIXME: future make this more easy / better to transfer
echo $root_password > ${vigir_hostname}.rootpw
cat <<EOF | ssh -t "root@${vigir_ip}"
# Remove temporary IP
@ -41,4 +37,7 @@ printf "${root_password}\n${root_password}\n" | passwd
reboot
EOF
printf "${root_password}\n${root_password}\n" | pass insert vigir/vigir${id}
pass git push
echo "Submit to user the root password = ${root_password}"