diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6a2e1dd --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Install and enable SSH server +# +update-rc.d ssh enable +invoke-rc.d ssh start +# +# +#apt update -y +# +# +#sudo apt install -y ansible sshpass git +# +# +ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -q -N "" +# +# +PUBKEY="'$(<~.ssh/id_rsa.pub)'" && ansible-playbook -i hosts deploy_authorized_keys.xml --ask-pass --extra-vars="pubkey=$PUBKEY" +ansible-playbook -i hosts main.yaml --ask-become-pass +ansible-playbook -i hosts reboot.yaml +reboot