17ce724fa4
This encapsulates the differences between switch OS modules. Also add support for global switch configuration.
23 lines
769 B
YAML
23 lines
769 B
YAML
---
|
|
# Switch configuration depends on the type of switch, so groups hosts by their
|
|
# switch type and apply tasks/roles to the relevant groups.
|
|
|
|
- name: Group hosts by their switch type
|
|
hosts: switches
|
|
gather_facts: no
|
|
tasks:
|
|
- name: Group hosts by their switch type
|
|
group_by:
|
|
key: "switches_of_type_{{ switch_type }}"
|
|
|
|
- name: Ensure DellOS physical switches are configured
|
|
hosts: switches_of_type_dellos6:switches_of_type_dellos9
|
|
gather_facts: no
|
|
roles:
|
|
- role: dell-switch
|
|
dell_switch_delegate_to: localhost
|
|
dell_switch_type: "{{ switch_type }}"
|
|
dell_switch_provider: "{{ switch_dellos_provider }}"
|
|
dell_switch_config: "{{ switch_config }}"
|
|
dell_switch_interface_config: "{{ switch_interface_config }}"
|