forked from data.coop/ansible
24 lines
584 B
YAML
24 lines
584 B
YAML
|
---
|
||
|
|
||
|
- name: create portainer volume folder
|
||
|
file:
|
||
|
name: "{{ portainer.volume_folder }}"
|
||
|
state: directory
|
||
|
|
||
|
- name: run portainer
|
||
|
docker_container:
|
||
|
name: portainer
|
||
|
image: portainer/portainer
|
||
|
restart_policy: always
|
||
|
networks:
|
||
|
- name: external_services
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
- "{{ portainer.volume_folder }}:/data"
|
||
|
published_ports:
|
||
|
- 9001:9000
|
||
|
env:
|
||
|
VIRTUAL_HOST: "{{ portainer.domain }}"
|
||
|
LETSENCRYPT_HOST: "{{ portainer.domain }}"
|
||
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|