kayobe/ansible/mgmt-switch-config.yml
Mark Goddard 08d34db3d1 Add initial work on network configuration for management network
Currently supports configuration of network interfaces
2017-03-15 10:19:41 +00:00

24 lines
709 B
YAML

---
- name: Ensure the power and management network switches are configured
hosts: mgmt-switches
gather_facts: no
vars:
provider:
host: "{{ ansible_host }}"
username: "{{ ansible_user }}"
password: "{{ ansible_ssh_pass }}"
transport: cli
authorize: yes
auth_pass: "{{ switch_auth_pass }}"
tasks:
- name: Ensure switch interfaces are configured
local_action:
module: dellos6_config
provider: "{{ provider }}"
lines: >
{{ ['description ' ~ item.value.description] +
item.value.config | default([]) }}
parents:
- "interface {{ item.key }}"
with_dict: "{{ switch_interface_config }}"