summaryrefslogtreecommitdiffstats
path: root/roles/lib_yaml_editor/build/ansible
diff options
context:
space:
mode:
authorMatt Woodson <mwoodson@gmail.com>2016-04-04 16:16:25 -0400
committerMatt Woodson <mwoodson@gmail.com>2016-04-04 16:16:25 -0400
commit9db67b8095b206efefeb2c3def07e1e4394733d0 (patch)
treeecd55d566adf0d2ccfaeaaec9c208af3fceae8bb /roles/lib_yaml_editor/build/ansible
parent63af28f86977e2d870153df98eae497a3c4680cf (diff)
parentc667debd59e584530438198dfcf77403ed9c18c4 (diff)
downloadopenshift-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.py5
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,