b2ae863f50
Latest ansible-lint is finding this. It seems reasonable enough to ensure the task is named; it's always nice to have context about what is happening as you read the file. Change-Id: Ia7e490aaba99da9694a6f3fdb1bca9838221b30a
36 lines
977 B
YAML
36 lines
977 B
YAML
# Note (dmsimard)
|
|
# We explicitely declare a PATH environment variable because '/sbin' is not in
|
|
# PATH when using 'become: yes' on some distributions
|
|
- name: Include common tasks
|
|
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']
|
|
|
|
- name: Include switch tasks
|
|
include_tasks:
|
|
file: switch.yaml
|
|
apply:
|
|
environment:
|
|
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
|
|
when: inventory_hostname in groups['switch']
|
|
|
|
- name: Include peer tasks
|
|
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']
|