2017-09-19 22:19:14 +08:00
|
|
|
---
|
2019-05-14 20:51:32 +08:00
|
|
|
- name: set_fact container_exec_cmd_nfs
|
2017-09-19 22:19:14 +08:00
|
|
|
set_fact:
|
2019-05-14 20:51:32 +08:00
|
|
|
container_exec_cmd_nfs: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
2019-05-22 16:02:42 +08:00
|
|
|
when: containerized_deployment | bool
|
2017-09-19 22:19:14 +08:00
|
|
|
|
2018-10-26 21:27:33 +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
|
|
|
|
2020-05-23 03:47:45 +08:00
|
|
|
- name: set_fact ceph_nfs_rgw_access_key and ceph_nfs_rgw_secret_key
|
2017-09-19 22:19:14 +08:00
|
|
|
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
|