ansible-nas/tasks/portainer.yml
animeai ce21999f46 Map all ports as variables in all.yml.dist
NOTE: The majority of traefik ports were totally broken and would never have worked. It should be the external port there, not the internal container port!.

Port conflicts were fixed.
2020-01-05 21:47:40 +00:00

26 lines
No EOL
745 B
YAML

---
- name: Create Portainer Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ portainer_data_directory }}"
- name: Portainer Docker Container
docker_container:
name: portainer
image: portainer/portainer
pull: true
volumes:
- "{{ portainer_data_directory }}:/data:rw"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/etc/timezone:/etc/timezone:ro"
ports:
- "{{ portainer_port }}:9000"
restart_policy: unless-stopped
memory: 1g
labels:
traefik.backend: "portainer"
traefik.frontend.rule: "Host:portainer.{{ ansible_nas_domain }}"
traefik.enable: "{{ portainer_available_externally }}"
traefik.port: "{{ portainer_port }}"