vigir: store password in password store
This commit is contained in:
parent
2d4fe86996
commit
ee7a504bba
1 changed files with 3 additions and 4 deletions
|
@ -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}"
|
||||||
|
|
Loading…
Reference in a new issue