2022-12-28 15:38:33 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2019-03-15 11:38:36 +00:00
|
|
|
---
|
|
|
|
- name: create portainer volume folder
|
|
|
|
file:
|
2022-11-26 08:15:18 +00:00
|
|
|
name: "{{ services.portainer.volume_folder }}"
|
2019-03-15 11:38:36 +00:00
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: run portainer
|
|
|
|
docker_container:
|
|
|
|
name: portainer
|
2022-11-26 08:15:18 +00:00
|
|
|
image: portainer/portainer-ee:{{ services.portainer.version }}
|
2019-03-15 11:38:36 +00:00
|
|
|
restart_policy: always
|
|
|
|
networks:
|
|
|
|
- name: external_services
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2022-11-26 08:15:18 +00:00
|
|
|
- "{{ services.portainer.volume_folder }}:/data"
|
2019-03-15 11:38:36 +00:00
|
|
|
env:
|
2022-11-26 08:15:18 +00:00
|
|
|
VIRTUAL_HOST: "{{ services.portainer.domain }}"
|
2021-01-26 20:59:26 +00:00
|
|
|
VIRTUAL_PORT: "9000"
|
2022-11-26 08:15:18 +00:00
|
|
|
LETSENCRYPT_HOST: "{{ services.portainer.domain }}"
|
2019-03-15 11:38:36 +00:00
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|