.templates | ||
contrib | ||
handlers | ||
inventories | ||
playbooks | ||
roles | ||
.ansible-lint | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
ansible.cfg | ||
pull.yml | ||
README.md | ||
reboot-home.yml | ||
reboot-prod.yml | ||
requirements.yml | ||
site.yml |
desu.ltd Ansible Management Repository
Contains core system configuration for all of desu.ltd and related environments
Initialization
- Clone
ansible-galaxy install -r requirements.yml
For quick bootstrapping of tools and libraries used in this repo, see rehashedsalt/ansible-env. I use that exact image for CI/CD.
Machine Setup
Linux Machines
Each Linux machine will require the following to be fulfilled for Ansible to access it:
-
The server has a user named
ansible
which:-
Accepts the public key located in
contrib/desu.pub
; and -
Has passwordless sudo capabilities as root
-
-
The server is running Ubuntu 20.04 or greater
To automate these host-local steps, use the script file contrib/bootstrap.sh
.
Other Machines
Unsupported at this time, though things that accept SSH might Just Work.
Machine Deployment
Deploying a new server will require that it be added to NetBox and that it is accessible from the Ansible host. From there, running the main playbook site.yml
will get the machine up to snuff.
Zerotier
A lot of my home network is connected via Zerotier. Initial deployment can be done locally through a bastion machine or similar, but subsequent deploys should run over Zerotier. Once configuration is available, you should log into the machine and modify Netbox to document its Zerotier IP in Netbox, setting it to be the primary IP of the device. The interface name should be zt0
.