A series of Ansible scripts to manage my infrastructure.
Go to file
2021-09-18 16:19:11 -05:00
.templates Fix template 2020-10-17 00:27:46 -05:00
contrib Move requirements.yml to root 2021-08-01 21:39:36 -05:00
handlers Move handlers to global handlers 2020-12-20 05:02:17 -06:00
inventory Decom the K8s cluster, roll all its jobs into one singular machine 2021-09-13 13:50:22 -05:00
inventory-hard Add emergency disaster-recovery inventory 2021-09-01 19:29:02 -05:00
playbooks Convert role invocations to use the full namespace of the role 2021-09-18 16:10:54 -05:00
roles Remove NRPE and Onlyoffice roles 2021-09-18 16:19:11 -05:00
.ansible-lint Amend ansible-lint configuration since we now have a unified installation directory for Galaxy roles 2021-09-18 16:14:14 -05:00
.gitignore Install Galaxy roles to their own directory so I don't have to maintain a long gitignore 2021-09-18 16:13:20 -05:00
.gitlab-ci.yml Decom the K8s cluster, roll all its jobs into one singular machine 2021-09-13 13:50:22 -05:00
.gitmodules Move fedi1 over, add Pleroma role 2021-01-25 22:19:31 -06:00
ansible.cfg Install Galaxy roles to their own directory so I don't have to maintain a long gitignore 2021-09-18 16:13:20 -05:00
README.md Add note to README about zt 2021-02-19 02:15:43 -06:00
reboot-home.yml Reconfigure reboot-home.yml 2021-09-14 19:06:46 -05:00
reboot-prod.yml Polish up those reboot playbooks 2021-08-25 12:20:47 -05:00
requirements.yml Remove another deprecated role 2021-09-18 16:11:48 -05:00
site.yml Decom the K8s cluster, roll all its jobs into one singular machine 2021-09-13 13:50:22 -05:00

Salt's Ansible Repository

Useful for management across all of 9iron, thefuck, and desu.

TODO

  • Figure out a good monitoring solution that doesn't suck ass

  • Port over configs for Nextcloud on web1.9iron.club

Initialization

Clone the repo, cd in. Done.

Deployment

Adding a new server will require the following be fulfilled:

  • The server is accessible from the Ansible host;

  • 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 added to inventory/hosts.yml in an appropriate place;

  • DNS records for the machine are set; and

  • The server is running Ubuntu 20.04 or greater

From there, running the playbook site.yml should get the machine up to snuff. To automate the host-local steps, use the script file contrib/bootstrap.sh.

Zerotier

A lot of my home-network side of things is connected together via ZeroTier; initial deployment/repairs may require specifying an ansible_host for the inventory item in question to connect to it locally. Subsequent plays will require connectivity to my home ZeroTier network.

Cloud-managed devices require no such workarounds.

Ad-Hoc Commands

The inventory is configured to allow for ad-hoc commands with very little fuss. For example:

ansible -m shell -a 'systemctl is-failed ansible-pull.service' all

These commands must be run from the root of the repo.

Ansible Galaxy

Several of the roles in this repository are sourced from Ansible Galaxy. They're mirrored here for both easy compatibility with ansible-pull and in case the sources go down. Despite this, they're still managed in roles/requirements.yml for ease of management, source tracking, and updating. Any forks or deviations from these sources should be thoroughly documented.

Should you need to reinitialize them, the following command (run from the root of the repo) will initialize all Galaxy assets:

ansible-galaxy install -r roles/requirements.yml