I'm trying to configure an Arista 7050 Switch's interfaces with Ansible.
Whenever I run the playbook, it keeps the status "changed". When I use the "fact_diff" module, it shows no output which means, the Ansible "before" and "after" values are the same. Please find below some code snippets.
The Task in the Playbook:
- name: Ensure all Access-Interfaces are configured with a VLANs and mode
arista.eos.eos_l2_interfaces:
config:
- name: Et47
mode: access
access:
vlan: 3
state: merged
register: access_if
tags:
- interfaces_vlans
- interfaces_vlans_access
Then, I try to find the diffs using this:
- name: Show Diffs
ansible.utils.fact_diff:
before: "{{ access_if.before }}"
after: "{{ access_if.after }}"
tags:
- interfaces_vlans
- interfaces_vlans_access
For some reasons the output of the "fact_diff" module is like this below, although the "eos_l2_interfaces" module shows changed.
ok: [zhloccs11a] => {
"changed": false,
"diff": {
"prepared": ""
},
"diff_lines": [],
"diff_text": ""
}
Ansible: 2.11 EOS: 4.18