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

View file

@ -19,10 +19,6 @@ vigir_hostname=vigir${id}
root_password=$(pwgen -1 32) 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}" cat <<EOF | ssh -t "root@${vigir_ip}"
# Remove temporary IP # Remove temporary IP
@ -41,4 +37,7 @@ printf "${root_password}\n${root_password}\n" | passwd
reboot reboot
EOF 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}" echo "Submit to user the root password = ${root_password}"