A series of Ansible scripts to manage my infrastructure.
Go to file
2021-02-08 10:41:07 -06:00
.templates Fix template 2020-10-17 00:27:46 -05:00
contrib Working on basics 2020-10-17 00:21:57 -05:00
handlers Move handlers to global handlers 2020-12-20 05:02:17 -06:00
inventory Make Apache configuration more secure, add SSL cache 2021-01-26 05:20:48 -06:00
playbooks Reorganize playbook for game1.thefuck.how 2021-02-04 02:02:00 -06:00
roles Always restart pulse. Always. 2021-02-08 10:41:07 -06:00
.gitignore Remove build directory from gitignore 2020-02-26 18:56:29 -06:00
.gitmodules Move fedi1 over, add Pleroma role 2021-01-25 22:19:31 -06:00
ansible.cfg Working on basics 2020-10-17 00:21:57 -05:00
README.md Update readme 2021-02-03 23:59:15 -06:00
reboot.yml Actually wait, the order was important 2021-01-26 05:57:07 -06:00
site.yml Ensure an up-to-date Ansible repo on all boxes 2021-02-03 01:25:51 -06:00

Salt's Ansible Repository

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

TODO

This branch is kinda-sorta a port of master, so it still needs to reach some form of feature parity with it. Namely:

  • 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.

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