mirror of https://github.com/ceph/ceph-ansible.git
ceph-nfs: fix keyring copy for external ganesha
Fix the condition on the keyring copy task that prevent the ganesha
keyring to be created in the /var/lib/ceph directory.
Also ensure that the directory exists first.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1831285
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 748ac4b928
)
pull/5342/head
parent
19d0db1c7b
commit
da04dfdddf
|
@ -33,11 +33,14 @@
|
||||||
block:
|
block:
|
||||||
- name: create keyring directory
|
- name: create keyring directory
|
||||||
file:
|
file:
|
||||||
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ceph_nfs_ceph_user }}"
|
path: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
||||||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
with_items:
|
||||||
|
- "{{ ceph_nfs_ceph_user }}"
|
||||||
|
- "{{ ansible_hostname }}"
|
||||||
|
|
||||||
- name: set_fact rgw_client_name
|
- name: set_fact rgw_client_name
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -55,7 +58,7 @@
|
||||||
- ['/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ceph_nfs_ceph_user }}/keyring', '/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}/keyring']
|
- ['/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ceph_nfs_ceph_user }}/keyring', '/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}/keyring']
|
||||||
when:
|
when:
|
||||||
- not item.0.get('skipped', False)
|
- not item.0.get('skipped', False)
|
||||||
- item.0.item.name == 'client.rgw.' + ceph_nfs_ceph_user
|
- item.0.item.name == 'client.' + ceph_nfs_ceph_user or item.0.item.name == rgw_client_name
|
||||||
|
|
||||||
- name: include start_nfs.yml
|
- name: include start_nfs.yml
|
||||||
import_tasks: start_nfs.yml
|
import_tasks: start_nfs.yml
|
||||||
|
|
Loading…
Reference in New Issue