Skip to content

Commit

Permalink
nfs/rgw: support enforcing keys
Browse files Browse the repository at this point in the history
if one sets `ceph_nfs_rgw_access_key` and/or `ceph_nfs_rgw_secret_key`,
the nfs/rgw user creation won't take those variables into account and it
will generate a user with automatically generated credentials.
It ends up with a mismatch between what will be set in ganesha.conf and
the created user.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2010754

Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed Oct 26, 2021
1 parent c5e4851 commit b8db116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/ceph-nfs/tasks/create_rgw_nfs_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
when: nfs_obj_gw | bool

- name: create rgw nfs user "{{ ceph_nfs_rgw_user }}"
command: "{{ container_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User'"
command: "{{ container_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User' {{ '--access-key=' + ceph_nfs_rgw_access_key if ceph_nfs_rgw_access_key is defined else '' }} {{ '--secret-key=' + ceph_nfs_rgw_secret_key if ceph_nfs_rgw_secret_key is defined else '' }}"
run_once: true
register: rgwuser
changed_when: false
Expand Down

0 comments on commit b8db116

Please sign in to comment.