mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 19:48:47 +00:00
39 lines
1.5 KiB
YAML
39 lines
1.5 KiB
YAML
---
|
|
- name: Start RSSBridge
|
|
block:
|
|
- name: Create RSSBridge Directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
# mode: 0755
|
|
with_items:
|
|
- "{{ rssbridge_data_directory }}/data"
|
|
|
|
- name: RSSBridge Docker Container
|
|
community.docker.docker_container:
|
|
container_default_behavior: no_defaults
|
|
name: "{{ rssbridge_container_name }}"
|
|
image: "{{ rssbridge_image_name }}:{{ rssbridge_image_version }}"
|
|
pull: true
|
|
volumes:
|
|
- "{{ rssbridge_data_directory }}/data:/config:rw"
|
|
ports:
|
|
- "{{ rssbridge_port }}:80"
|
|
restart_policy: unless-stopped
|
|
memory: "{{ rssbridge_memory }}"
|
|
labels:
|
|
traefik.enable: "{{ rssbridge_available_externally | string }}"
|
|
traefik.http.routers.rssbridge.rule: "Host(`{{ rssbridge_hostname }}.{{ ansible_nas_domain }}`)"
|
|
traefik.http.routers.rssbridge.tls.certresolver: "letsencrypt"
|
|
traefik.http.routers.rssbridge.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
traefik.http.routers.rssbridge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
traefik.http.services.rssbridge.loadbalancer.server.port: "80"
|
|
when: rssbridge_enabled is true
|
|
|
|
- name: Stop RSSBridge
|
|
block:
|
|
- name: Stop RSSBridge
|
|
community.docker.docker_container:
|
|
name: "{{ rssbridge_container_name }}"
|
|
state: absent
|
|
when: rssbridge_enabled is false
|