From 3950751317a507bdadc12a7ac9877b931166cd4a Mon Sep 17 00:00:00 2001 From: pprokop Date: Tue, 28 Jun 2016 13:46:01 +0200 Subject: [PATCH] Adding an option to choose an etcd port and tag of docker images --- roles/ceph-osd/defaults/main.yml | 1 + roles/ceph-osd/templates/ceph-osd.service.j2 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 2a4e6f58c..a86bc1dcd 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -123,6 +123,7 @@ osd_containerized_deployment: false osd_containerized_deployment_with_kv: false kv_type: etcd kv_endpoint: 127.0.0.1 +kv_port: 4001 ceph_osd_docker_prepare_env: "OSD_FORCE_ZAP=1" ceph_osd_docker_username: ceph ceph_osd_docker_imagename: daemon diff --git a/roles/ceph-osd/templates/ceph-osd.service.j2 b/roles/ceph-osd/templates/ceph-osd.service.j2 index 7ca3826da..12e6a9520 100644 --- a/roles/ceph-osd/templates/ceph-osd.service.j2 +++ b/roles/ceph-osd/templates/ceph-osd.service.j2 @@ -5,7 +5,7 @@ After=docker.service [Service] EnvironmentFile=-/etc/environment ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i -ExecStartPre=-/usr/bin/docker rm {{ ansible_hostname }}-osd-dev%i +ExecStartPre=-/usr/bin/docker rm -f {{ ansible_hostname }}-osd-dev%i ExecStart=/usr/bin/docker run --rm --net=host --pid=host\ {% if not osd_containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph \ @@ -13,6 +13,7 @@ ExecStart=/usr/bin/docker run --rm --net=host --pid=host\ {% else -%} -e KV_TYPE={{kv_type}} \ -e KV_IP={{kv_endpoint}} \ + -e KV_PORT={{kv_port}} \ {% endif -%} -v /dev:/dev \ --privileged \