1
0
mirror of https://github.com/ansible-collections/community.general.git synced 2025-07-29 07:41:16 +03:00

VarDict: convenience methods (#6647)

* vardict module util: add methods as_dict and get_meta

* add test for get_meta()

* update reserved named in VarDict

* add changelog frag

* add breaking change to changelog frag
This commit is contained in:
Alexei Znamensky
2023-06-11 20:34:06 +12:00
committed by GitHub
parent 42f7531f21
commit 2bd8469a92
3 changed files with 26 additions and 2 deletions

View File

@ -131,3 +131,4 @@ def test_vardict_dict():
vd.set("zz", 789)
assert vd.as_dict() == {"xx": 123, "yy": 456, "zz": 789}
assert vd.get_meta("xx") == {"output": True, "change": False, "diff": False, "fact": False, "verbosity": 0}