2017-08-28 15:31:54 +00:00
|
|
|
---
|
|
|
|
- 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:
|
|
|
|
- "9000:9000"
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.backend: "portainer"
|
|
|
|
traefik.frontend.rule: "Host:portainer.{{ ansible_nas_domain }}"
|
|
|
|
traefik.enable: "{{ portainer_available_externally }}"
|
|
|
|
traefik.port: "9000"
|
2017-08-28 15:31:54 +00:00
|
|
|
|