mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-27 18:55:17 +00:00
699e1b15fd
I've created the Role but I do not yet know if it will work.
27 lines
946 B
YAML
27 lines
946 B
YAML
---
|
|
- name: Create Piwigo Directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ piwigo_config_directory }}"
|
|
- "{{ piwigo_logs }}"
|
|
|
|
- name: Piwigo Docker Container
|
|
docker_container:
|
|
name: piwigo
|
|
image: linuxserver/piwigo
|
|
pull: true
|
|
volumes:
|
|
- "{{ piwigo_config_directory }}:/config:rw"
|
|
- "{{ piwigo_photos }}:/gallery:rw"
|
|
network_mode: "host"
|
|
restart_policy: unless_stopped
|
|
memory: "{{ piwigo_memory }}"
|
|
lables:
|
|
traefik.enable: "{{ piwigo_available_externally }}"
|
|
traefik.http.routers.piwigo.rule: "Host(`{{ piwigo_hostname }}.{{ ansible_nas_domain }}`)"
|
|
traefik.http.routers.piwigo.tls.certresolver: "letsencrypt"
|
|
traefik.http.routers.piwigo.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
traefik.http.routers.piwigo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
traefik.http.services.piwigo.loadbalancer.server.port: 80
|