2017-09-19 22:19:14 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Create rgw nfs user "{{ ceph_nfs_rgw_user }}"
|
2020-05-23 03:47:45 +08:00
|
|
|
radosgw_user:
|
|
|
|
name: "{{ ceph_nfs_rgw_user }}"
|
|
|
|
cluster: "{{ cluster }}"
|
|
|
|
display_name: "RGW NFS User"
|
|
|
|
access_key: "{{ ceph_nfs_rgw_access_key | default(omit) }}"
|
|
|
|
secret_key: "{{ ceph_nfs_rgw_secret_key | default(omit) }}"
|
2017-10-04 19:16:04 +08:00
|
|
|
run_once: true
|
2020-05-23 03:47:45 +08:00
|
|
|
register: rgw_nfs_user
|
2017-09-27 05:16:43 +08:00
|
|
|
changed_when: false
|
2017-09-19 22:19:14 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2020-05-23 03:47:45 +08:00
|
|
|
when: nfs_obj_gw | bool
|
|
|
|
environment:
|
|
|
|
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
|
|
|
|
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
|
2017-09-19 22:19:14 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set_fact ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key
|
|
|
|
ansible.builtin.set_fact:
|
2020-05-23 03:47:45 +08:00
|
|
|
ceph_nfs_rgw_access_key: "{{ (rgw_nfs_user.stdout | from_json)['keys'][0]['access_key'] }}"
|
|
|
|
ceph_nfs_rgw_secret_key: "{{ (rgw_nfs_user.stdout | from_json)['keys'][0]['secret_key'] }}"
|
2017-09-19 22:19:14 +08:00
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
2020-05-23 03:47:45 +08:00
|
|
|
when: nfs_obj_gw | bool
|