diff options
author | Matt Woodson <mwoodson@gmail.com> | 2016-04-04 16:16:25 -0400 |
---|---|---|
committer | Matt Woodson <mwoodson@gmail.com> | 2016-04-04 16:16:25 -0400 |
commit | 9db67b8095b206efefeb2c3def07e1e4394733d0 (patch) | |
tree | ecd55d566adf0d2ccfaeaaec9c208af3fceae8bb /roles/lib_yaml_editor/build/ansible | |
parent | 63af28f86977e2d870153df98eae497a3c4680cf (diff) | |
parent | c667debd59e584530438198dfcf77403ed9c18c4 (diff) | |
download | openshift-9db67b8095b206efefeb2c3def07e1e4394733d0.tar.gz openshift-9db67b8095b206efefeb2c3def07e1e4394733d0.tar.bz2 openshift-9db67b8095b206efefeb2c3def07e1e4394733d0.tar.xz openshift-9db67b8095b206efefeb2c3def07e1e4394733d0.zip |
Merge pull request #1704 from kwoodson/yeditfix
yedit now handles periods in key names
Diffstat (limited to 'roles/lib_yaml_editor/build/ansible')
-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, |