# Build a list of Adtran AP mac addresses found on directly connected switch ports
- name: PARSE AND FILTER MAC ADDRESS-TABLE
ansible.builtin.set_fact:
macs: "{{ macs + [item] }}"
loop: "{{ macs_raw.stdout[0] | ansible.netcommon.parse_cli_textfsm('templates/cisco_ios_show_mac-address-table.textfsm') }}"
when:
- item.DESTINATION_PORT[0] not in neighbors.keys() # Ignore macs found on neighboring switches
- item.DESTINATION_ADDRESS is search('^0019\.92.*$') # Ignore macs that aren't Adtran APs
I get the following deprecation warning:
[DEPRECATION WARNING]: Use 'ansible.utils.hwaddr' module instead. This feature will be removed from ansible.netcommon in a release after 2024-01-01. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
ansible --version
ansible [core 2.16.6]
config file = /workspaces/git/my-repo/ansible/ansible.cfg
configured module search path = ['/home/vscode/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/python/3.11.6/lib/python3.11/site-packages/ansible
ansible collection location = /home/vscode/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/python/current/bin/ansible
python version = 3.11.6 (main, Dec 19 2023, 21:21:06) [GCC 11.4.0] (/usr/local/python/3.11.6/bin/python)
jinja version = 3.1.4
libyaml = True
Why?
hwaddr, part of the ipaddr set of filters was moved. Twice, from to pre-collections ansible to ansible.netcommon then to ansible.utils. They did not want to tie generally useful netaddr based utilities to the manage network gear code in ansible.netcommon.
As the warning says, ansible.utils is the name to use. Search everything for
hwaddr
filter references.