portainer: the network creation has its own task
This commit is contained in:
parent
b5caf21a6a
commit
5c110ab154
|
@ -17,7 +17,7 @@ docker_swarm_portainer_hostname: 'portainer-swarm.example.com'
|
|||
docker_swarm_portainer_additional_constraints: []
|
||||
# - 'node.hostname != docker01'
|
||||
|
||||
docker_swarm_portainer_network: 'agent_network'
|
||||
docker_swarm_portainer_network: 'portainer_agent_network'
|
||||
docker_swarm_portainer_http_port: '9000'
|
||||
docker_swarm_portainer_service_port: '8000'
|
||||
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
- 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: Create the overlay network that will be used by portainer
|
||||
docker_network:
|
||||
name: '{{ docker_swarm_portainer_network }}'
|
||||
driver: overlay
|
||||
scope: swarm
|
||||
|
||||
- name: Run the docker stack to start portainer
|
||||
docker_stack:
|
||||
state: present
|
||||
|
|
|
@ -47,10 +47,5 @@ services:
|
|||
driver: 'journald'
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
{{ docker_swarm_portainer_network }}:
|
||||
driver: overlay
|
||||
attachable: true
|
||||
|
||||
volumes:
|
||||
portainer_data:
|
||||
|
|
Loading…
Reference in New Issue