Add docker-swarm setup
This commit is contained in:
parent
578f8b7dbf
commit
7e99f97958
2 changed files with 18 additions and 4 deletions
17
roles/docker-swarm/tasks/main.yml
Normal file
17
roles/docker-swarm/tasks/main.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# Bring up a docker swarm
|
||||
# needs community docker module installed:
|
||||
# run $`ansible-galaxy collection install community.docker`
|
||||
|
||||
- name: Ensure swarm is initialized
|
||||
community.docker.docker_swarm:
|
||||
state: present
|
||||
# advertise_addr: eth1 # necessary for testing setup on vagrant
|
||||
become: true
|
||||
|
||||
- name: Ensure public network exists
|
||||
community.docker.docker_network:
|
||||
name: public
|
||||
driver: overlay
|
||||
state: present
|
||||
become: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue