ansible-role-swarm/tasks/cluster.yml

17 lines
406 B
YAML
Raw Normal View History

2019-08-24 10:55:56 +00:00
---
- name: init swarm cluster
docker_swarm:
advertise_addr: '{{ docker_advertise_addr }}'
state: present
when: docker_swarm_manager
tags: docker
- name: join swarm cluster
docker_swarm:
advertise_addr: '{{ docker_advertise_addr }}'
join_token: '{{ docker_join_token }}'
remote_addrs: '{{ docker_remote_addrs }}'
state: join
when: not docker_swarm_manager
tags: docker