Skip to content

Commit d7341f1

Browse files
author
mac@lowang
committed
restart swarm-agent on failure
1 parent 5e1e20e commit d7341f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

playbooks/roles/swarm-manage/templates/swarm-agent.service.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ExecStart=/usr/bin/docker run \
1212
--addr={{ node_ip }}:{{ docker_port }} \
1313
etcd://{{ node_ip }}:{{ etcd_client_port }}/lain/swarm
1414
ExecStop=/bin/bash -c '/usr/bin/docker stop %n || true'
15+
Restart=on-failure
1516

1617
[Install]
1718
WantedBy=multi-user.target

0 commit comments

Comments
 (0)