From 920d9e0eeee889c6482413e836e080c52110c0c9 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 24 May 2018 18:19:51 +0100 Subject: [PATCH] Add Dell PowerConnect switch support PowerConnect switches do not support the dellos Ansible modules, since they are based on DellOS version 4. This role uses the expect module to perform simple switch configuration. Change-Id: Icb59aaff75f9faf089423610fecb06598f75e35e Story: 2002106 Task: 19784 --- ansible/group_vars/switches/dell-powerconnect | 12 ++++++++++++ ansible/physical-network.yml | 12 ++++++++++++ .../dell-powerconnect-switch-860fbcbf7e4323ea.yaml | 5 +++++ requirements.yml | 1 + 4 files changed, 30 insertions(+) create mode 100644 ansible/group_vars/switches/dell-powerconnect create mode 100644 releasenotes/notes/dell-powerconnect-switch-860fbcbf7e4323ea.yaml diff --git a/ansible/group_vars/switches/dell-powerconnect b/ansible/group_vars/switches/dell-powerconnect new file mode 100644 index 000000000..d98fc38b2 --- /dev/null +++ b/ansible/group_vars/switches/dell-powerconnect @@ -0,0 +1,12 @@ +--- +# Switch configuration. + +############################################################################### +# Authentication configuration. + +# For DellOS switches, this defines a 'provider' argument to the +# dell_powerconnect_switch role. +switch_dell_powerconnect_provider: + host: "{{ ansible_host }}" + username: "{{ ansible_user }}" + auth_pass: "{{ switch_auth_pass }}" diff --git a/ansible/physical-network.yml b/ansible/physical-network.yml index f87ee3b6e..9166ada8e 100644 --- a/ansible/physical-network.yml +++ b/ansible/physical-network.yml @@ -81,6 +81,18 @@ dell_switch_config: "{{ switch_config }}" dell_switch_interface_config: "{{ switch_interface_config }}" +- name: Ensure Dell PowerConnect physical switches are configured + hosts: switches_of_type_dell-powerconnect:&switches_in_display_mode_False + gather_facts: no + roles: + - role: ssh-known-host + + - role: stackhpc.dell-powerconnect-switch + dell_powerconnect_switch_type: "{{ switch_type }}" + dell_powerconnect_switch_provider: "{{ switch_dell_powerconnect_provider }}" + dell_powerconnect_switch_config: "{{ switch_config }}" + dell_powerconnect_switch_interface_config: "{{ switch_interface_config }}" + - name: Ensure Juniper physical switches are configured hosts: switches_of_type_junos:&switches_in_display_mode_False gather_facts: no diff --git a/releasenotes/notes/dell-powerconnect-switch-860fbcbf7e4323ea.yaml b/releasenotes/notes/dell-powerconnect-switch-860fbcbf7e4323ea.yaml new file mode 100644 index 000000000..c040ff6f9 --- /dev/null +++ b/releasenotes/notes/dell-powerconnect-switch-860fbcbf7e4323ea.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for configuration of Dell PowerConnect switches. This is + integrated with the `kayobe physical network configure` command. diff --git a/requirements.yml b/requirements.yml index 0cc06d688..425393df9 100644 --- a/requirements.yml +++ b/requirements.yml @@ -8,6 +8,7 @@ - src: https://github.com/stackhpc/ansible-users version: append name: singleplatform-eng.users +- src: stackhpc.dell-powerconnect-switch - src: stackhpc.drac - src: stackhpc.drac-facts - src: stackhpc.grafana-conf