ceph-rgw: Fix bad paths which depend on the clustername

The path of the RGW environment file (in the /var/lib/ceph/radosgw/
directory) depends on the Ceph clustername. It was not taken into
account in the Ansible role `ceph-rgw`.

Signed-off-by: flaf <francois.lafont.1978@gmail.com>
(cherry picked from commit 4c3e77d869)
pull/3815/merge
François Lafont 2019-04-06 11:44:03 +02:00 committed by Dimitri Savineau
parent bf672f14fe
commit af78673328
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
- name: generate environment file
become: true
copy:
dest: "/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
dest: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
owner: "root"
group: "root"
mode: "0644"

View File

@ -6,7 +6,7 @@ After=docker.service
{% set cpu_limit = ansible_processor_vcpus|int if ceph_rgw_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_rgw_docker_cpu_limit|int %}
[Service]
EnvironmentFile=/var/lib/ceph/radosgw/ceph-%i/EnvironmentFile
EnvironmentFile=/var/lib/ceph/radosgw/{{ cluster }}-%i/EnvironmentFile
ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \