Ansible Setup » History » Version 14
Jon Goldberg, 07/28/2020 12:35 AM
1 | 1 | Jon Goldberg | # Ansible Setup |
---|---|---|---|
2 | |||
3 | 13 | Jon Goldberg | Ansible setup is now done through Ansible itself plus a short bootstrap script. Please check earlier revisions of this page for manual setup. |
4 | 1 | Jon Goldberg | |
5 | 13 | Jon Goldberg | ### Prerequisites |
6 | * You have sudo installed and you have sudo permissions. |
||
7 | * You have a GPG key pair and SSH key pair on this computer. |
||
8 | * Your SSH public key for this computer must be added to your Gitea account. Ideally it's also on other servers. |
||
9 | * Your GPG public key must be added to the pass database, and it must be signed by Jon. |
||
10 | 14 | Jon Goldberg | * Nextcloud should be installed. |
11 | 13 | Jon Goldberg | NOTE: You can bootstrap without adding your server to crm.megaphonetech.com, but after bootstrap your server must be in the inventory. |
12 | 1 | Jon Goldberg | |
13 | 13 | Jon Goldberg | ### Bootstrap script |
14 | Run these commands: |
||
15 | 11 | Jon Goldberg | |
16 | 13 | Jon Goldberg | ```shell |
17 | sudo apt install ansible git |
||
18 | git clone https://github.com/MegaphoneJon/ansible-main.git ansible |
||
19 | cd ansible |
||
20 | git submodule init |
||
21 | git submodule sync |
||
22 | git submodule update |
||
23 | # If this server has no desktop environment, you'll probably need to start ssh-agent manually. Otherwise skip the next 2 commands. |
||
24 | eval "$(ssh-agent)" |
||
25 | # This command will prompt you for your SSH passphrase. |
||
26 | ssh-add |
||
27 | # run the bootstrap. You'll be prompted for your 'BECOME password'; it's your user pw (for sudo). |
||
28 | 1 | Jon Goldberg | ansible-playbook localhost-bootstrap.yml --ask-become-pass |
29 | 14 | Jon Goldberg | # Your computer must be in the "Server List" on crm.megaphonetech.com to do the next step. |
30 | run provision.yml --tags bootstrap |
||
31 | 13 | Jon Goldberg | ``` |