diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2016-04-04 16:07:02 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2016-04-04 16:11:26 -0400 |
commit | c667debd59e584530438198dfcf77403ed9c18c4 (patch) | |
tree | 472fc9c1219113dcc08ededb64d425fbcac8c576 /roles/lib_yaml_editor/build/ansible/yedit.py | |
parent | e878e61bbe1d44f4c998b533131fd76ae8d40ebd (diff) | |
download | openshift-c667debd59e584530438198dfcf77403ed9c18c4.tar.gz openshift-c667debd59e584530438198dfcf77403ed9c18c4.tar.bz2 openshift-c667debd59e584530438198dfcf77403ed9c18c4.tar.xz openshift-c667debd59e584530438198dfcf77403ed9c18c4.zip |
Fixing regexp. Periods are no longer allowed
Diffstat (limited to 'roles/lib_yaml_editor/build/ansible/yedit.py')
-rw-r--r-- | roles/lib_yaml_editor/build/ansible/yedit.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/lib_yaml_editor/build/ansible/yedit.py b/roles/lib_yaml_editor/build/ansible/yedit.py index a4c0d40b3..dab3d6347 100644 --- a/roles/lib_yaml_editor/build/ansible/yedit.py +++ b/roles/lib_yaml_editor/build/ansible/yedit.py @@ -45,13 +45,16 @@ def main(): if rval: rval = yamlfile.put(module.params['key'], value) + if rval[0]: + yamlfile.write() module.exit_json(changed=rval[0], results=rval[1], state="present") if not module.params['content']: rval = yamlfile.create(module.params['key'], value) else: - yamlfile.write() rval = yamlfile.load() + yamlfile.write() + module.exit_json(changed=rval[0], results=rval[1], state="present") module.exit_json(failed=True, |