echo "**Deleting .git so you can start your own repo" rm -rf .git echo "***Ansible vault password***" echo "This is used to encrypt/descrypt secrets in your vault" echo "We'll save it to a file in ~/.[file name] so it doesn't have to be typed every time" echo read -p "File name (no . prefix): " ansible_vault_pass_filename read -s -p "Password: " ansible_vault_pass echo $ansible_vault_pass > ~/.$ansible_vault_pass_filename echo "vault_password_file = ~/.$ansible_vault_pass_filename" >>ansible.cfg echo echo echo "***Ansible become password***" echo "A lot of actions need sudo. This password will be stored in group_vars/all.yml encrypted" read -s -p "Password: " ansible_become_pass echo "# Sudo password for your servers" >>./group_vars/all.yml ansible-vault encrypt_string "$ansible_become_pass" --name 'ansible_become_pass' >>./group_vars/all.yml echo echo echo "Setup complete" echo "You can delete setup.sh since running it again would cause issues" echo "Config for vault password was output to ./ansible.cfg" echo "Config for sudo (become) password was output to ./group_vars/all.yml"