--- - name: Start Tautulli block: - name: Create Tautulli Directories ansible.builtin.file: path: "{{ item }}" state: directory # mode: 0755 with_items: - "{{ tautulli_config_directory }}" - "{{ plex_logs }}" - name: Tautulli Docker Container community.docker.docker_container: container_default_behavior: no_defaults name: "{{ tautulli_container_name }}" image: "{{ tautulli_image_name }}:{{ tautulli_image_version }}" pull: true volumes: - "{{ tautulli_config_directory }}:/config:rw" - "{{ plex_logs }}:/logs:ro" ports: - "{{ tautulli_port }}:8181" env: TZ: "{{ ansible_nas_timezone }}" PUID: "{{ tautulli_user_id }}" PGID: "{{ tautulli_group_id }}" restart_policy: unless-stopped memory: "{{ tautulli_memory }}" labels: traefik.enable: "{{ tautulli_available_externally | string }}" traefik.http.routers.tautulli.rule: "Host(`{{ tautulli_hostname }}.{{ ansible_nas_domain }}`)" traefik.http.routers.tautulli.tls.certresolver: "letsencrypt" traefik.http.routers.tautulli.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.tautulli.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.services.tautulli.loadbalancer.server.port: "8181" when: tautulli_enabled is true - name: Stop Tautulli block: - name: Stop Tautulli community.docker.docker_container: name: "{{ tautulli_container_name }}" state: absent when: tautulli_enabled is false