Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_gather_facts/tests/asserts/system_assert.yml

raw symbols SCIP
1 - name: Set the keys diff
2 ansible.builtin.set_fact:
3 idrac_system_attributes: "{{ idrac.system_attributes }}"
4
5 - name: Set the keys diff
6 ansible.builtin.set_fact:
7 api_idrac_system_attributes: "{{ api_idrac.api_system_attributes }}"
8
9 - name: Set the keys diff
10 ansible.builtin.set_fact:
11 diff_keys: "{{ idrac_system_attributes.keys() | list | symmetric_difference((api_idrac_system_attributes.keys() | list)) }}"
12
13 - name: Set a Diff of dict
14 ansible.builtin.set_fact:
15 diff_data: "{{ diff_data | combine({item: idrac_system_attributes[item]}) }}"
16 loop: "{{ idrac_system_attributes.keys() }}"
17 when:
18 - diff_keys | length == 0
19 - idrac_system_attributes[item] != api_idrac_system_attributes[item]
20 - item not in exclude_keys
21 - item != "ThermalSettings.1.SystemExhaustTemperature"
22
23 - name: Assert the difference in Keys
24 ansible.builtin.assert:
25 that:
26 - (diff_keys | length) == 0
27 - (diff_data | length) == 0
28 fail_msg: "The response from the role does not match | Diff Keys : {{ diff_keys }} Diff Data : {{ diff_data }}"
29 success_msg: "The response from the role matches | Diff Keys : {{ diff_keys }} Diff Data : {{ diff_data }}"