|
|
@ -151,7 +151,6 @@ EXAMPLES = '''
|
|
|
|
- name: Init a new swarm with default parameters
|
|
|
|
- name: Init a new swarm with default parameters
|
|
|
|
docker_swarm:
|
|
|
|
docker_swarm:
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
advertise_addr: 192.168.1.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Update swarm configuration
|
|
|
|
- name: Update swarm configuration
|
|
|
|
docker_swarm:
|
|
|
|
docker_swarm:
|
|
|
@ -330,9 +329,6 @@ class SwarmManager(DockerBaseClass):
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if self.parameters.advertise_addr is None:
|
|
|
|
|
|
|
|
self.client.fail(msg="advertise_addr is required to initialize a swarm cluster.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.client.init_swarm(
|
|
|
|
self.client.init_swarm(
|
|
|
|
advertise_addr=self.parameters.advertise_addr, listen_addr=self.parameters.listen_addr,
|
|
|
|
advertise_addr=self.parameters.advertise_addr, listen_addr=self.parameters.listen_addr,
|
|
|
|
force_new_cluster=self.parameters.force_new_cluster, swarm_spec=self.parameters.spec)
|
|
|
|
force_new_cluster=self.parameters.force_new_cluster, swarm_spec=self.parameters.spec)
|
|
|
|