Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- name: "{{{ rule_title }}} - Disable promiscuous mode"
ansible.builtin.command:
cmd: ip link set dev {{ item.split(':')[1] }} multicast off promisc off
cmd: ip link set dev {{ (item.split(':')[1] | trim).split('@')[0] }} multicast off promisc off
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change looks good to me. However, I have noticed a suspicious thing that exists below on line 16.

network_interfaces.stdout_lines is defined and "item.split(':') | length == 3"

I think that the double quotes shouldn't be there because they represent a string literal, not a jinja expression.

I think it should be:

network_interfaces.stdout_lines is defined and item.split(':') | length == 3

Can you take a look into this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I'm not sure why it was like that before or how it was passing tests. Added another commit to resolve that.

loop: "{{ network_interfaces.stdout_lines }}"
when: network_interfaces.stdout_lines is defined and "item.split(':') | length == 3"
when: network_interfaces.stdout_lines is defined and item.split(':') | length == 3

Loading