Ansible Setup » History » Revision 20
Revision 19 (Jon Goldberg, 02/14/2022 04:15 PM) → Revision 20/32 (Jon Goldberg, 02/14/2022 04:17 PM)
{{last_updated_at}} by {{last_updated_by}} # Ansible Setup Ansible setup is now done through Ansible itself plus a short bootstrap script. Please check earlier revisions of this page for manual setup. ### Prerequisites * You have sudo installed and you have sudo permissions. * You have a GPG key pair and SSH key pair on this computer. * Your SSH public key for this computer must be added to your Gitea account. Ideally it's also on other servers. * Your GPG public key must be added to the pass database, and it must be signed by Jon. * Nextcloud should be installed. NOTE: You can bootstrap without adding your server to crm.megaphonetech.com, but after bootstrap your server must be in the inventory. ### Bootstrap script Run these commands: ```shell useradd -m ansible #untested, pretty sure this is correct. Need ansible user before we can run localhost-bootstrap. sudo apt install ansible git git clone https://github.com/MegaphoneJon/ansible-main.git ansible cd ansible git submodule init git submodule sync git submodule update # Install some extra Ansible plugins ansible-galaxy collection install community.general # If this server has no desktop environment, you'll probably need to start ssh-agent manually. Otherwise skip the next 2 commands. eval "$(ssh-agent)" # This command will prompt you for your SSH passphrase. ssh-add # run the bootstrap. You'll be prompted for your 'BECOME password'; it's your user pw (for sudo). ansible-playbook localhost-bootstrap.yml --ask-become-pass # Your computer must be in the "Server List" on crm.megaphonetech.com to do the next step. run provision.yml --tags bootstrap ```