2020-09-30 17:14:29 +02:00
|
|
|
---
|
|
|
|
- name: Manage the installation of portainer as a stack
|
|
|
|
block:
|
|
|
|
- name: Install the portainer docker stack configuration
|
|
|
|
template: src=portainer-agent-stack.yml.j2 dest=/srv/portainer-agent-stack.yml owner=root group=root mode='0444'
|
|
|
|
|
|
|
|
- name: Run the docker stack to start portainer
|
|
|
|
docker_stack:
|
|
|
|
state: present
|
|
|
|
name: portainer
|
|
|
|
compose:
|
|
|
|
- /srv/portainer-agent-stack.yml
|
|
|
|
run_once: True
|
|
|
|
|
2020-10-01 17:38:36 +02:00
|
|
|
when: docker_swarm_manager_main_node | bool
|
2020-09-30 17:14:29 +02:00
|
|
|
tags: [ 'portainer', 'docker_portainer', 'docker_swarm', 'docker' ]
|