I already know hot to bond to interfaces with ansible. But here is were it gets complicated: I need to make a playbook that lists all the facts, filtering just the interfaces, classifying them by speed and bonding them automatically.
The idea would be to start with something like this, but I’m completely lost.
- hosts: pve1 remote_user: root tasks:
- name: print interfaces debug: msg: “{{ ansible_facts | dict2items | selectattr(‘value.speed’, ‘defined’) | map(attribute=‘value’) | list}}”
If someone knows and explains me how to do it, it would be very nice