7975e874e8
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
29 lines
813 B
YAML
29 lines
813 B
YAML
# Note (dmsimard)
|
|
# We explicitely declare a PATH environment variable because '/sbin' is not in
|
|
# PATH when using 'become: yes' on some distributions
|
|
- 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:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: inventory_hostname in groups['switch']
|
|
static: no
|
|
|
|
- include: peer.yaml
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: inventory_hostname in groups['peers']
|
|
static: no
|
|
|
|
- name: Persist iptables rules
|
|
include_role:
|
|
name: persistent-firewall
|
|
when: >-
|
|
inventory_hostname in groups['switch'] or
|
|
inventory_hostname in groups['peers']
|