Skip to content

Commit cd289c5

Browse files
authored
Fix credential existence check for rgw usage exporter
credential_check.stdout is a string representation of a list, and as such will never return true when compared to an empty Python list. Passing credential_check.stdout through the from_json filter casts the string to a list, and the equality can be properly evaluated.
1 parent 08d0735 commit cd289c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/kayobe/ansible/deploy-radosgw-usage-exporter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
vars:
6767
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
6868
run_once: true
69-
when: credential_check.stdout == []
69+
when: credential_check.stdout | from_json == []
7070

7171
- name: Query ec2 credential for ceph_rgw
7272
ansible.builtin.command: >

0 commit comments

Comments
 (0)