From fcf8e6f1af68797e4a54efb22a47095fc4e3bedf Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 31 Mar 2016 16:29:20 -0400 Subject: Yedit enhancements --- roles/lib_yaml_editor/build/ansible/yedit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/lib_yaml_editor/build/ansible/yedit.py') diff --git a/roles/lib_yaml_editor/build/ansible/yedit.py b/roles/lib_yaml_editor/build/ansible/yedit.py index bf868fb71..a4c0d40b3 100644 --- a/roles/lib_yaml_editor/build/ansible/yedit.py +++ b/roles/lib_yaml_editor/build/ansible/yedit.py @@ -24,7 +24,7 @@ def main(): yamlfile = Yedit(module.params['src'], module.params['content']) - rval = yamlfile.get() + rval = yamlfile.load() if not rval and state != 'present': module.fail_json(msg='Error opening file [%s]. Verify that the' + \ ' file exists, that it is has correct permissions, and is valid yaml.') @@ -51,7 +51,7 @@ def main(): rval = yamlfile.create(module.params['key'], value) else: yamlfile.write() - rval = yamlfile.get() + rval = yamlfile.load() module.exit_json(changed=rval[0], results=rval[1], state="present") module.exit_json(failed=True, -- cgit v1.2.3