Sonarr
TV Management.
Ansible Role: sonarr
You can copy your existing configuration to sonarr_config
directory
adjusting for paths.
The UID/GID should be set to a user/group that has access to your media. All media clients should run under the same user to run correctly.
Your downloader will report the download path mapped in the downloader service. You need to map this exact path in Sonarr for it to be able to post-process downloads properly.
See Basic Configuration for example configuration.
# Sonarr
Sonarr installation from public release tarball.
## Requirements
No additional requirements.
## Role Variables
Settings have been throughly documented for usage.
[defaults/main.yml](https://github.com/r-pufky/ansible_sonarr/blob/main/defaults/main/main.yml).
### Ports
All ports and protocols have been defined for the role.
Hosts should only define firewall rules for ports they need.
[defaults/ports.yml](https://github.com/r-pufky/ansible_sonarr/blob/main/defaults/main/ports.yml).
## Dependencies
N/A
## Example Playbook
host_vars/sonarr.example.com/vars/sonarr.yml
``` yaml
sonarr_api_key: '{{ vault_sonarr_api_key }}'
sonarr_update_automatically: true
sonarr_port: '8989'
```
site.yml
``` yaml
- name: 'sonarr server'
hosts: 'sonarr.example.com'
become: true
roles:
- 'r_pufky.sonarr'
```
## Issues
Create a bug and provide as much information as possible.
Associate pull requests with a submitted bug.
## License
[AGPL-3.0 License](https://github.com/r-pufky/ansible_sonarr/blob/main/LICENSE)
## Author Information
https://keybase.io/rpufky
None
Role Details: Updated: 2022-10-08 galaxy source service docs
Ports
---
###############################################################################
# Ports Configuration
###############################################################################
# Ports should be managed externally via an OS role.
#
# Reference:
# * https://docs.ansible.com/ansible/latest/collections/community/general/ufw_module.html
ports:
- {proto: 'tcp', from_ip: 'any', to_port: 8989, direction: 'in', comment: 'sonarr http'}
- {proto: 'tcp', from_ip: '127.0.0.1', to_port: 8989, direction: 'in', comment: 'sonarr http api'}
- {proto: 'tcp', from_ip: 'any', to_port: 9898, direction: 'in', comment: 'sonarr https'}
- {proto: 'tcp', from_ip: '127.0.0.1', to_port: 9898, direction: 'in', comment: 'sonarr https api'}
Defaults
---
###############################################################################
# Sonarr Role Configuration
###############################################################################
# User that sonarr will run under. Assumes externally managed.
sonarr_user: 'media'
sonarr_group: 'media'
# Create 'media' user if not detected? See: vars/main.yml.
sonarr_create_user: false
# Installation directory
sonarr_dir: '/var/lib/sonarr'
# Staging directory for backups
sonarr_staging: '/var/lib/sonarr-staging'
# Target location of backup file on ansible host.
sonarr_local_backup: 'host_vars/data/sonarr-config.tar.gz'
###############################################################################
# Sonarr config.xml Configuration
###############################################################################
sonarr_port: '8989' # http port
sonarr_bind_address: '*'
# Sonarr requires ssl port to be defined even if unused
sonarr_ssl_port: '9898' # https port
sonarr_enable_ssl: false
sonarr_api_key: ''
sonarr_authentication_method: 'None'
sonarr_log_level: 'info'
# Default: undefined
sonarr_launch_browser: false
sonarr_branch: 'main'
sonarr_ssl_cert_hash: ''
sonarr_update_mechanism: 'BuiltIn'
# Default: undefined
sonarr_analytics_enabled: false
# Default: undefined
sonarr_update_automatically: false
sonarr_url_base: ''