]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
client: add quotes to the dict values
authorSébastien Han <seb@redhat.com>
Wed, 18 Apr 2018 13:11:55 +0000 (15:11 +0200)
committerSébastien Han <seb@redhat.com>
Wed, 18 Apr 2018 15:46:54 +0000 (17:46 +0200)
ceph-authtool does not support raw arguements so we have to quote caps
declaration like this allow 'bla bla' instead of allow bla bla

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1568157
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-client/tasks/create_users_keys.yml

index b5b012e1b77b9a31d2a2575f724ef67ad2dfb281..36bbcc8ef125543c2785de229dfa42fa5aec530c 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: set_fact keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
   set_fact:
-    keys_tmp: "{{ keys_tmp|default([]) + [ { 'key': item.key, 'name': item.name, 'caps': { 'mon': item.mon_cap, 'osd': item.osd_cap|default(''), 'mds': item.mds_cap|default(''), 'mgr': item.mgr_cap|default('') } , 'mode': item.mode } ] }}"
+    keys_tmp: "{{ keys_tmp|default([]) + [ { 'key': item.key, 'name': item.name, 'caps': { 'mon': item.mon_cap|quote, 'osd': item.osd_cap|default('')|quote, 'mds': item.mds_cap|default('')|quote, 'mgr': item.mgr_cap|default('')|quote } , 'mode': item.mode } ] }}"
   when:
     - item.get('mon_cap', None) # it's enough to assume we are running an old-fashionned syntax simply by checking the presence of mon_cap since every key needs this cap
   with_items: "{{ keys }}"