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
+6
View File
@@ -0,0 +1,6 @@
---
frigate_compose_dir: /opt/frigate
frigate_config_dir: /opt/frigate/config
frigate_media_dir: /media/frigate
frigate_image: "ghcr.io/blakeblackshear/frigate:stable"
frigate_host: "frigate.{{ domain }}"
+28
View File
@@ -0,0 +1,28 @@
---
- name: Create Frigate directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: glyptic
group: docker
mode: "0755"
loop:
- "{{ frigate_compose_dir }}"
- "{{ frigate_config_dir }}"
- "{{ frigate_media_dir }}"
tags: [frigate]
- name: Deploy Frigate compose file
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ frigate_compose_dir }}/docker-compose.yml"
owner: glyptic
group: docker
mode: "0644"
tags: [frigate]
- name: Start Frigate
community.docker.docker_compose_v2:
project_src: "{{ frigate_compose_dir }}"
state: present
tags: [frigate]
@@ -0,0 +1,30 @@
services:
frigate:
image: {{ frigate_image }}
container_name: frigate
restart: unless-stopped
privileged: true
shm_size: "256mb"
ports:
- "5000:5000"
- "8554:8554"
- "8555:8555/tcp"
- "8555:8555/udp"
volumes:
- {{ frigate_config_dir }}:/config
- {{ frigate_media_dir }}:/media/frigate
- /etc/localtime:/etc/localtime:ro
environment:
FRIGATE_RTSP_PASSWORD: "{{ vault_frigate_rtsp_password | default('changeme') }}"
labels:
traefik.enable: "true"
traefik.http.routers.frigate.rule: "Host(`{{ frigate_host }}`)"
traefik.http.routers.frigate.entrypoints: websecure
traefik.http.routers.frigate.tls.certresolver: cloudflare
traefik.http.services.frigate.loadbalancer.server.port: "5000"
networks:
- {{ docker_network_name }}
networks:
{{ docker_network_name }}:
external: true