# platform = multi_platform_all
# reboot = false
# strategy = restrict
# complexity = low
# disruption = low

- name: "{{{ rule_title }}} - Gather network interfaces"
  ansible.builtin.command:
    cmd: ip -o link show
  register: network_interfaces

- name: "{{{ rule_title }}} - Disable promiscuous mode"
  ansible.builtin.command:
    cmd: ip link set dev {{ (item.split(':')[1] | trim).split('@')[0] }} multicast off promisc off
  loop: "{{ network_interfaces.stdout_lines }}"
  when: network_interfaces.stdout_lines is defined and item.split(':') | length >= 3

