Skip to content

Commit

Permalink
Check if openstack user exists before trying to create it
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount authored and openshift-merge-bot[bot] committed Nov 19, 2024
1 parent 1d89345 commit 231ddc0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions roles/cifmw_cephadm/tasks/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@
vars:
ceph_command: "radosgw-admin"

- name: Check if Ceph user exists
ignore_errors: true
become: true
ansible.builtin.command:
cmd: >-
{{ cifmw_cephadm_ceph_cli }} user info --uid openstack
register: cifmw_ceph_s3_user

- name: Ceph rgw - create access/secret key
when: cifmw_ceph_s3_user.rc > 0
become: true
ansible.builtin.command:
cmd: >-
Expand Down

0 comments on commit 231ddc0

Please sign in to comment.