ansible/roles/docker/tasks/services/portainer.yml

23 lines
677 B
YAML
Raw Normal View History

2019-03-15 11:38:36 +00:00
---
- name: create portainer volume folder
2022-11-26 08:52:41 +00:00
ansible.builtin.file:
name: '{{ services.portainer.volume_folder }}'
2019-03-15 11:38:36 +00:00
state: directory
- name: run portainer
2022-11-26 08:52:41 +00:00
community.docker.docker_container:
2019-03-15 11:38:36 +00:00
name: portainer
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:52:41 +00:00
- '{{ services.portainer.volume_folder }}:/data'
2019-03-15 11:38:36 +00:00
env:
2022-11-26 08:52:41 +00:00
VIRTUAL_HOST: '{{ services.portainer.domain }}'
VIRTUAL_PORT: '9000'
LETSENCRYPT_HOST: '{{ services.portainer.domain }}'
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'