strip keys recursively

This commit is contained in:
Brian Coca 2016-03-16 13:09:27 -07:00
parent 7346e3098a
commit 61f05c2e8d

View file

@ -83,6 +83,8 @@ def strip_internal_keys(dirty):
for k in dirty.keys():
if isinstance(k, string_types) and k.startswith('_ansible_'):
del clean[k]
elif isinstance(dirty[k], dict):
clean[k] = strip_internal_keys(dirty[k])
return clean
class VariableManager: