ansible/roles/docker/tasks/services/portainer.yml
2022-12-28 16:38:33 +01:00

23 lines
666 B
YAML

# vim: ft=yaml.ansible
---
- name: create portainer volume folder
file:
name: "{{ services.portainer.volume_folder }}"
state: directory
- name: run portainer
docker_container:
name: portainer
image: portainer/portainer-ee:{{ services.portainer.version }}
restart_policy: always
networks:
- name: external_services
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "{{ services.portainer.volume_folder }}:/data"
env:
VIRTUAL_HOST: "{{ services.portainer.domain }}"
VIRTUAL_PORT: "9000"
LETSENCRYPT_HOST: "{{ services.portainer.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"