docker: make ceph docker osd script path

Since distro will not allow /usr/share to be writable (e.g: atomic) so
we let the operator decide where to put that script.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/1287/head
Sébastien Han 2017-02-16 22:13:26 +01:00
parent 7b216aa8e0
commit b91d227b99
5 changed files with 5 additions and 2 deletions

View File

@ -193,4 +193,5 @@ dummy:
#ceph_osd_docker_devices: "{{ devices }}"
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME
#ceph_osd_docker_run_script_path: "/usr/share"

View File

@ -185,3 +185,4 @@ ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK
ceph_osd_docker_devices: "{{ devices }}"
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME
ceph_osd_docker_run_script_path: "/usr/share"

View File

@ -71,7 +71,7 @@
become: true
template:
src: "{{ role_path }}/templates/ceph-osd-run.sh.j2"
dest: /usr/share/ceph-osd-run.sh
dest: "{{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh"
owner: "root"
group: "root"
mode: "0744"

View File

@ -7,7 +7,7 @@ After=docker.service
EnvironmentFile=-/etc/environment
ExecStartPre=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
ExecStartPre=-/usr/bin/docker rm -f {{ ansible_hostname }}-osd-dev%i
ExecStart=/usr/share/ceph-osd-run.sh %i
ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
ExecStop=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
Restart=always
RestartSec=10s

View File

@ -21,3 +21,4 @@ ceph_osd_docker_devices: "{{ devices }}"
devices:
- /dev/sda
- /dev/sdb
ceph_osd_docker_run_script_path: /var/tmp