diff options
author | Chris West <solo-github@goeswhere.com> | 2017-07-25 10:38:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 10:38:46 +0100 |
commit | d2830289f1c4863bfb2ab03919190d8811f1209f (patch) | |
tree | 2e66c0cf0084b963dee589f5a45801e0c5080892 /ghetto_json | |
parent | 0f43790b23a94464765a81e72070304eeff7f387 (diff) | |
parent | 718509eee06ecffb5580f45ff166c3fb4565f42f (diff) | |
download | ghetto-json-d2830289f1c4863bfb2ab03919190d8811f1209f.tar.gz ghetto-json-d2830289f1c4863bfb2ab03919190d8811f1209f.tar.bz2 ghetto-json-d2830289f1c4863bfb2ab03919190d8811f1209f.tar.xz ghetto-json-d2830289f1c4863bfb2ab03919190d8811f1209f.zip |
Merge pull request #5 from MarkTickner/patch-1
Remove added '_ansible_' JSON fields
Diffstat (limited to 'ghetto_json')
-rwxr-xr-x | ghetto_json | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ghetto_json b/ghetto_json index 60d8542..8d9e5bd 100755 --- a/ghetto_json +++ b/ghetto_json @@ -15,6 +15,10 @@ def main(params_list): path = params.pop('path') changed = False + for key in params.keys(): + if key.startswith('_ansible_'): + params.pop(key) + with open(path) as f: obj = json_load(f) for (key, target) in params.items(): |