diff --git a/roles/multi-node-bridge/tasks/main.yaml b/roles/multi-node-bridge/tasks/main.yaml index 384d1abf8..3fe15bda7 100644 --- a/roles/multi-node-bridge/tasks/main.yaml +++ b/roles/multi-node-bridge/tasks/main.yaml @@ -4,6 +4,9 @@ - include: common.yaml environment: PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin" + when: >- + inventory_hostname in groups['switch'] or + inventory_hostname in groups['peers'] - include: switch.yaml environment: @@ -20,3 +23,6 @@ - name: Persist iptables rules include_role: name: persistent-firewall + when: >- + inventory_hostname in groups['switch'] or + inventory_hostname in groups['peers']