Initial Ansible automation for hobbs.farm infrastructure

Complete IaC covering:
- 14 roles: common, docker, traefik, vaultwarden, monitoring, media, matrix,
  home_assistant, frigate, adguard, gitea, semaphore, openclaw, security, backup
- Inventory for all hosts (Peggy, Bart, Yoda, NAS, Firewalla)
- Stack playbooks: core-infrastructure, monitoring, media, communication,
  automation, smarthome, security-hardening
- Maintenance playbooks: update-containers, backup, health-check
- Production Docker Compose templates with Traefik labels
- Security hardening (sysctl, auditd, UFW, fail2ban)
- Automated backups with retention policy
This commit is contained in:
2026-02-01 23:14:46 -06:00
parent 02beae23a0
commit b9be45dc71
74 changed files with 2110 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
---
matrix_compose_dir: "{{ docker_compose_base }}/communication"
synapse_data_dir: /data/synapse
synapse_image: "matrixdotorg/synapse:latest"
matrix_host: "matrix.{{ domain }}"
matrix_server_name: "{{ domain }}"
matrix_shared_secret: "{{ vault_matrix_shared_secret }}"
+27
View File
@@ -0,0 +1,27 @@
---
- name: Create Matrix directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: glyptic
group: docker
mode: "0755"
loop:
- "{{ matrix_compose_dir }}"
- "{{ synapse_data_dir }}"
tags: [matrix, communication]
- name: Deploy Matrix compose file
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ matrix_compose_dir }}/docker-compose.yml"
owner: glyptic
group: docker
mode: "0644"
tags: [matrix, communication]
- name: Start Matrix stack
community.docker.docker_compose_v2:
project_src: "{{ matrix_compose_dir }}"
state: present
tags: [matrix, communication]
@@ -0,0 +1,22 @@
services:
synapse:
image: {{ synapse_image }}
container_name: synapse
restart: unless-stopped
environment:
SYNAPSE_SERVER_NAME: {{ matrix_server_name }}
SYNAPSE_REPORT_STATS: "no"
volumes:
- {{ synapse_data_dir }}:/data
labels:
traefik.enable: "true"
traefik.http.routers.synapse.rule: "Host(`{{ matrix_host }}`)"
traefik.http.routers.synapse.entrypoints: websecure
traefik.http.routers.synapse.tls.certresolver: cloudflare
traefik.http.services.synapse.loadbalancer.server.port: "8008"
networks:
- {{ docker_network_name }}
networks:
{{ docker_network_name }}:
external: true