Ensure proper JSON serialization

The current opportunistic way breaks if you're trying to pass bools.

Change-Id: I4a79d9dcbc4234bd606a430cfe1c88c8650108e8
This commit is contained in:
Soren Hansen 2019-09-27 11:22:51 +02:00
parent 113d85d23b
commit 6d46f937e1
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class KeystoneSp(object):
self.protocols_return_list = list()
self.sp_data = self.module.params['sp_data']
if isinstance(self.sp_data, str):
self.sp_data = json.loads(self.sp_data.replace("'", '"'))
self.sp_data = json.loads(self.sp_data)
def populate_sp_data(self):
trusted_idp_list = self.sp_data['trusted_idp_list']

View File

@ -20,7 +20,7 @@
# User with_subelements instead, but in v1.x it's broken
- name: Set keystone_federated_identities fact
keystone_sp:
sp_data: "{{ keystone_sp }}"
sp_data: "{{ keystone_sp | to_json }}"
- name: Ensure domain which remote IDP users are mapped onto exists
keystone: