86 lines
3.1 KiB
Markdown
86 lines
3.1 KiB
Markdown
<!--
|
|
Ansible Roles for managing Auengun.net Infrastructure & Testing/Learning.
|
|
Source available at git.auengun.net/homelab/ansible-collection
|
|
Copyright (C) 2023 GregoryDosh
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
SPDX-FileCopyrightText: 2023 GregoryDosh
|
|
-->
|
|
|
|
# Ansible Collection `auengun.homelab`
|
|
|
|
A collection of Ansible roles to manage the various tasks in my homelab.
|
|
|
|
## Collection Installation
|
|
|
|
### Python/Poetry Dependencies
|
|
|
|
**TODO:** Document these better in version control with renovate.
|
|
|
|
If using [Poetry](https://python-poetry.org), this is an example [`pyproject.toml`](https://python-poetry.org/docs/pyproject/) snippet to install the required Python dependencies.
|
|
|
|
```toml
|
|
[tool.poetry.dependencies]
|
|
python = "^3.10"
|
|
ansible = "^9.2"
|
|
ansible-core = "^2.16"
|
|
jmespath = "^1.0.1"
|
|
passlib = "^1.7.4"
|
|
```
|
|
|
|
### Ansible Galaxy - `requirements.yml`
|
|
|
|
Add the following snippet to Ansible Galaxy's [`requirements.yml`](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file) file.
|
|
|
|
```yaml
|
|
collections:
|
|
- name: ssh://git@git.auengun.net/homelab/ansible-collection.git
|
|
type: git
|
|
# Note: it's better to pin to a commit than main.
|
|
version: main
|
|
```
|
|
|
|
Then install using [`ansible-galaxy`](https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html).
|
|
|
|
```shell
|
|
ansible-galaxy collection install -r requirements.yml
|
|
```
|
|
|
|
## Roles
|
|
|
|
### [`auengun.homelab.caddy`](./roles/caddy)
|
|
|
|
A systemd service wrapping a [custom caddy binary](https://git.auengun.net/homelab/bin-caddy) enabling some rate limiting and other features for my common services.
|
|
|
|
Read the [README.md](./roles/caddy/README.md) for usage and configuration details.
|
|
|
|
### [`auengun.homelab.common`](./roles/common)
|
|
|
|
A set of shifting common tasks for bootstrapping and setting up the many physical and virtual machines in my homelab.
|
|
|
|
Read the [README.md](./roles/common/README.md) for usage and configuration details.
|
|
|
|
### [`auengun.homelab.dcaass`](./roles/dcaass)
|
|
|
|
Wraps a `docker-compose.yml` with a `systemd` service and easy user overrides of the `.yml` config.
|
|
|
|
Read the [README.md](./roles/dcaass/README.md) for usage and configuration details.
|
|
|
|
### [`auengun.homelab.cron_healthcheck_script`](./roles/cron_healthcheck_script)
|
|
|
|
Quickly wrap a basic shell script with a `crontab` schedule and [Healthchecks.io](https://healthchecks.io) alert.
|
|
|
|
Read the [README.md](./roles/cron_healthcheck_script/README.md) for usage and configuration details.
|