puppet-prod/hieradata/roles/apps/media/sonarr.yaml
Ben Vincent f22556b39f feat: manage sonarr configuration
- add config class to sonarr module
- update params to include unique group param
2024-06-25 23:45:29 +10:00

57 lines
1.4 KiB
YAML

---
hiera_include:
- sonarr
- profiles::nginx::simpleproxy
# manage sonarr
sonarr:
user: sonarr
group: sonarr
base_path: /opt/sonarr
install_path: /opt/sonarr/bin
archive_version: 4.0.5
archive_name: Sonarr.main.linux-x64.tar.gz
service_enable: true
service_name: sonarr
# additional altnames
profiles::pki::vault::alt_names:
- sonarr.main.unkin.net
- sonarr.service.consul
- sonarr.query.consul
- "sonarr.service.%{facts.country}-%{facts.region}.consul"
# manage a simple nginx reverse proxy
profiles::nginx::simpleproxy::nginx_vhost: 'sonarr.query.consul'
profiles::nginx::simpleproxy::nginx_aliases:
- sonarr.main.unkin.net
- sonarr.service.consul
- sonarr.query.consul
- "sonarr.service.%{facts.country}-%{facts.region}.consul"
profiles::nginx::simpleproxy::proxy_port: 8989
profiles::nginx::simpleproxy::proxy_host: 127.0.0.1
profiles::nginx::simpleproxy::proxy_path: '/'
# configure consul service
nginx::client_max_body_size: 10M
consul::services:
sonarr:
service_name: 'sonarr'
tags:
- 'media'
- 'sonarr'
address: "%{facts.networking.ip}"
port: 443
checks:
- id: 'sonarr_http_check'
name: 'Sonarr HTTP Check'
http: "https://%{facts.networking.fqdn}:443"
method: 'GET'
tls_skip_verify: true
interval: '10s'
timeout: '1s'
profiles::consul::client::node_rules:
- resource: service
segment: sonarr
disposition: write