From 5b133636de0b742ff2f7aa62a5d89a3a171fd3fe Mon Sep 17 00:00:00 2001 From: Zhuoyun Wei Date: Mon, 16 May 2016 15:30:20 +0800 Subject: [PATCH] Remove exisiting swarm-{agent,manager}.service This closes #2. --- playbooks/roles/swarm-manage/templates/swarm-agent.service.j2 | 1 + playbooks/roles/swarm-manage/templates/swarm-manager.service.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/playbooks/roles/swarm-manage/templates/swarm-agent.service.j2 b/playbooks/roles/swarm-manage/templates/swarm-agent.service.j2 index 8f6659a..8f32ff6 100644 --- a/playbooks/roles/swarm-manage/templates/swarm-agent.service.j2 +++ b/playbooks/roles/swarm-manage/templates/swarm-agent.service.j2 @@ -3,6 +3,7 @@ Description=docker swarm agent After=docker.service [Service] +ExecStartPre=/usr/bin/docker rm -f %n ExecStart=/usr/bin/docker run \ --name %n \ --rm \ diff --git a/playbooks/roles/swarm-manage/templates/swarm-manager.service.j2 b/playbooks/roles/swarm-manage/templates/swarm-manager.service.j2 index 4cc98ac..e4aab44 100644 --- a/playbooks/roles/swarm-manage/templates/swarm-manager.service.j2 +++ b/playbooks/roles/swarm-manage/templates/swarm-manager.service.j2 @@ -3,6 +3,7 @@ Description=docker swarm manager After=docker.service [Service] +ExecStartPre=/usr/bin/docker rm -f %n ExecStart=/usr/bin/docker run \ --name %n \ --rm \