42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
- name: Create directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "/data/sabnzbd"
|
|
- "/data/sabnzbd/config"
|
|
|
|
- name: Pull docker image
|
|
community.docker.docker_image:
|
|
image: linuxserver/sabnzbd
|
|
tag: 4.5.3
|
|
source: pull
|
|
register: docker_image
|
|
|
|
- name: Create the sabnzbd container
|
|
docker_container:
|
|
name: sabnzbd
|
|
image: "{{ docker_image.image.RepoTags[0] }}"
|
|
restart_policy: unless-stopped
|
|
recreate: true
|
|
networks:
|
|
- name: proxy
|
|
env:
|
|
PUID: "1000"
|
|
PGID: "1000"
|
|
TZ: "Australia/Brisbane"
|
|
HOSTNAME: "sabnzbd.comprofix.xyz"
|
|
DOCKER_MODS: "ghcr.io/themepark-dev/theme.park:sabnzbd"
|
|
volumes:
|
|
- "/data/sabnzbd/config:/config"
|
|
- /mnt/nfs/data:/data
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.http.routers.sabnzbd.rule: "Host(`sabnzbd.comprofix.xyz`)"
|
|
traefik.http.routers.sabnzbd.entrypoints: "https"
|
|
traefik.http.routers.sabnzbd.tls: "true"
|
|
traefik.http.services.sabnzbd.loadbalancer.server.port: "8080"
|
|
when: docker_image.changed
|
|
register: container_sabnzbd
|