a1e6229171
This is deprecated, and include_tasks is sufficient and present in all supported versions. Change-Id: If88d9d6ce9fb40a9a8e42e7a32d473ffd51b780a
33 lines
892 B
YAML
33 lines
892 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_tasks:
|
|
file: common.yaml
|
|
apply:
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: >-
|
|
inventory_hostname in groups['switch'] or
|
|
inventory_hostname in groups['peers']
|
|
|
|
- include_tasks:
|
|
file: switch.yaml
|
|
apply:
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: inventory_hostname in groups['switch']
|
|
|
|
- include_tasks:
|
|
file: peer.yaml
|
|
apply:
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: inventory_hostname in groups['peers']
|
|
|
|
- name: Persist iptables rules
|
|
include_role:
|
|
name: persistent-firewall
|
|
when: >-
|
|
inventory_hostname in groups['switch'] or
|
|
inventory_hostname in groups['peers']
|