mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
strip keys recursively
This commit is contained in:
parent
7346e3098a
commit
61f05c2e8d
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue