ansible-role-docker-swarm/tasks/portainer.yml

17 lines
549 B
YAML
Raw Normal View History

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
when: docker_swarm_manager_main_node | bool
2020-09-30 17:14:29 +02:00
tags: [ 'portainer', 'docker_portainer', 'docker_swarm', 'docker' ]