Debian Codegraph @

test/integration/targets/module_utils/library/test_recursive_diff.py

raw
1 #!/usr/bin/python
2 # Copyright: (c) 2020, Matt Martz <[email protected]>
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 from __future__ import annotations
6
7 from ansible.module_utils.basic import AnsibleModule
8 from ansible.module_utils.common.dict_transformations import recursive_diff
9
10
11 def main():
12 module = AnsibleModule(
13 {
14 'a': {'type': 'dict'},
15 'b': {'type': 'dict'},
16 }
17 )
18
19 module.exit_json(
20 the_diff=recursive_diff(
21 module.params['a'],
22 module.params['b'],
23 ),
24 )
25
26
27 if __name__ == '__main__':
28 main()