ansible/README.md

39 lines
1.5 KiB
Markdown
Raw Normal View History

2022-04-18 11:30:34 -05:00
# desu.ltd Ansible Management Repository
2020-10-17 00:21:57 -05:00
2022-04-18 11:30:34 -05:00
Contains core system configuration for all of desu.ltd and related environments
2021-09-24 21:59:12 -05:00
2020-10-28 22:42:11 -05:00
## Initialization
2021-09-18 16:44:56 -05:00
* Clone
* `ansible-galaxy install -r requirements.yml`
2020-10-28 22:42:11 -05:00
2021-09-24 21:59:12 -05:00
For quick bootstrapping of tools and libraries used in this repo, see [rehashedsalt/ansible-env](https://gitlab.com/rehashedsalt/docker-ansible-env). I use that exact image for CI/CD.
2022-04-18 11:30:34 -05:00
## Machine Setup
2020-10-17 00:21:57 -05:00
### Linux Machines
2020-10-17 00:21:57 -05:00
2021-10-27 20:51:40 -05:00
Each Linux machine will require the following to be fulfilled for Ansible to access it:
2020-10-17 00:21:57 -05:00
* The server has a user named `ansible` which:
* Accepts the public key located in `contrib/desu.pub`; and
* Has passwordless sudo capabilities as root
2021-10-27 20:51:40 -05:00
* The server is running Ubuntu 20.04 or greater
To automate these host-local steps, use the script file `contrib/bootstrap.sh`.
2022-04-18 11:30:34 -05:00
### Other Machines
2022-04-18 11:30:34 -05:00
Unsupported at this time, though things that accept SSH might Just Work.
2022-04-18 11:30:34 -05:00
## Machine Deployment
2022-04-18 11:30:34 -05:00
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.
2020-11-07 00:47:18 -06:00
2021-02-19 02:15:43 -06:00
## Zerotier
2022-04-18 11:30:34 -05:00
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`.