Install openswitch and firewall if need a bridge only

In case of nodeset which doesn't have peers and switch there is
no need to install openswitch and firewall rules, because nothing
will be installed. Let's skip it if no need.
Change-Id: I98cf5ec390ee22e538baa076c9ab87eea6a44c9e
This commit is contained in:
Sagi Shnaidman 2020-10-13 14:25:36 +03:00
parent 7e150858e4
commit 7975e874e8

View File

@ -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']