1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

use to_str instead of json.dumps when serializing k8s object for logging

This commit is contained in:
Fabian von Feilitzsch 2017-10-13 23:38:50 -04:00 committed by Chris Houseknecht
parent 6e6a6ff36b
commit 20d2a83e13

View file

@ -226,7 +226,7 @@ class KubernetesAnsibleModule(AnsibleModule):
self.exit_json(**return_attributes) self.exit_json(**return_attributes)
else: else:
self.helper.log('Existing:') self.helper.log('Existing:')
self.helper.log(json.dumps(existing.to_dict(), indent=4)) self.helper.log(existing.to_str(), indent=4)
self.helper.log('\nDifferences:') self.helper.log('\nDifferences:')
self.helper.log(json.dumps(diff, indent=4)) self.helper.log(json.dumps(diff, indent=4))
# Differences exist between the existing obj and requested params # Differences exist between the existing obj and requested params