mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
VarDict module utils: add as_dict() method (#6602)
* VarDict module utils: add `as_dict()` method * add changelog frag
This commit is contained in:
@@ -173,3 +173,6 @@ class VarDict(object):
|
||||
@property
|
||||
def has_changed(self):
|
||||
return any(True for var in self.__vars__.values() if var.has_changed)
|
||||
|
||||
def as_dict(self):
|
||||
return dict((name, var.value) for name, var in self.__vars__.items())
|
||||
|
||||
Reference in New Issue
Block a user