17 lines
542 B
YAML
17 lines
542 B
YAML
---
|
|
- 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
|
|
|
|
when: docker_swarm_manager_main_node
|
|
tags: [ 'portainer', 'docker_portainer', 'docker_swarm', 'docker' ]
|