Add support for dellos10 switch configuration
Change-Id: I2823016294e7df63f63be9ab26535b3962a71ebe
This commit is contained in:
parent
b77033970a
commit
1fbb5cb400
@ -27,6 +27,7 @@
|
|||||||
- arista
|
- arista
|
||||||
- dellos6
|
- dellos6
|
||||||
- dellos9
|
- dellos9
|
||||||
|
- dellos10
|
||||||
- dell-powerconnect
|
- dell-powerconnect
|
||||||
- junos
|
- junos
|
||||||
- mellanox
|
- mellanox
|
||||||
@ -111,7 +112,7 @@
|
|||||||
arista_switch_interface_config: "{{ switch_interface_config }}"
|
arista_switch_interface_config: "{{ switch_interface_config }}"
|
||||||
|
|
||||||
- name: Ensure DellOS physical switches are configured
|
- name: Ensure DellOS physical switches are configured
|
||||||
hosts: switches_of_type_dellos6:switches_of_type_dellos9:&switches_in_display_mode_False
|
hosts: switches_of_type_dellos6:switches_of_type_dellos9:switches_of_type_dellos10:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Dell Switch
|
Dell Switch
|
||||||
===========
|
===========
|
||||||
|
|
||||||
This role configures Dell switches using the `dellos6` or `dellos9` Ansible
|
This role configures Dell switches using the `dellos6`, `dellos9`, or
|
||||||
modules. It provides a fairly minimal abstraction of the configuration
|
`dellos10` Ansible modules. It provides a fairly minimal abstraction of the
|
||||||
interface provided by the `dellos` modules, allowing for application of
|
configuration interface provided by the `dellos` modules, allowing for
|
||||||
arbitrary switch configuration options.
|
application of arbitrary switch configuration options.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
@ -14,7 +14,8 @@ The switches should be configured to allow SSH access.
|
|||||||
Role Variables
|
Role Variables
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
`dell_switch_type` is the type of Dell switch. One of `dellos6`, `dellos9`.
|
`dell_switch_type` is the type of Dell switch. One of `dellos6`, `dellos9`, or
|
||||||
|
`dellos10`.
|
||||||
|
|
||||||
`dell_switch_provider` is authentication provider information passed as the
|
`dell_switch_provider` is authentication provider information passed as the
|
||||||
`provider` argument to the `dellos` modules.
|
`provider` argument to the `dellos` modules.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# Type of Dell switch. One of dellos6, dellos9.
|
# Type of Dell switch. One of dellos6, dellos9, or dellos10.
|
||||||
dell_switch_type:
|
dell_switch_type:
|
||||||
|
|
||||||
# Authentication provider information.
|
# Authentication provider information.
|
||||||
|
@ -12,3 +12,10 @@
|
|||||||
provider: "{{ dell_switch_provider }}"
|
provider: "{{ dell_switch_provider }}"
|
||||||
src: dellos9-config.j2
|
src: dellos9-config.j2
|
||||||
when: dell_switch_type == 'dellos9'
|
when: dell_switch_type == 'dellos9'
|
||||||
|
|
||||||
|
- name: Ensure DellOS10 switches are configured
|
||||||
|
local_action:
|
||||||
|
module: dellos10_config
|
||||||
|
provider: "{{ dell_switch_provider }}"
|
||||||
|
src: "{{ lookup('template', 'dellos10-config.j2') }}"
|
||||||
|
when: dell_switch_type == 'dellos10'
|
||||||
|
16
ansible/roles/dell-switch/templates/dellos10-config.j2
Normal file
16
ansible/roles/dell-switch/templates/dellos10-config.j2
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#jinja2: trim_blocks: True,lstrip_blocks: True
|
||||||
|
|
||||||
|
{% for line in dell_switch_config %}
|
||||||
|
{{ line }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for interface, config in dell_switch_interface_config.items() %}
|
||||||
|
interface {{ interface }}
|
||||||
|
{% if config.description is defined %}
|
||||||
|
description {{ config.description }}
|
||||||
|
{% endif %}
|
||||||
|
{% for line in config.config %}
|
||||||
|
{{ line }}
|
||||||
|
{% endfor %}
|
||||||
|
exit
|
||||||
|
{% endfor %}
|
@ -18,6 +18,7 @@ The following switch operating systems are currently supported:
|
|||||||
<https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-44/System-Configuration/Network-Command-Line-Utility-NCLU/>`__)
|
<https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-44/System-Configuration/Network-Command-Line-Utility-NCLU/>`__)
|
||||||
* Dell OS 6
|
* Dell OS 6
|
||||||
* Dell OS 9
|
* Dell OS 9
|
||||||
|
* Dell OS 10
|
||||||
* Dell PowerConnect
|
* Dell PowerConnect
|
||||||
* Juniper Junos OS
|
* Juniper Junos OS
|
||||||
* Mellanox MLNX OS
|
* Mellanox MLNX OS
|
||||||
@ -192,13 +193,13 @@ default connection parameters used by Ansible:
|
|||||||
|
|
||||||
* ``ansible_user`` is the SSH username.
|
* ``ansible_user`` is the SSH username.
|
||||||
|
|
||||||
Dell OS6 and OS9
|
Dell OS6, OS9, and OS10
|
||||||
----------------
|
-----------------------
|
||||||
|
|
||||||
Configuration for these devices is applied using the ``dellos6_config`` and
|
Configuration for these devices is applied using the ``dellos6_config``,
|
||||||
``dellos9_config`` Ansible modules.
|
``dellos9_config``, and ``dellos10_config`` Ansible modules.
|
||||||
|
|
||||||
``switch_type`` should be set to ``dellos6`` or ``dellos9``.
|
``switch_type`` should be set to ``dellos6``, ``dellos9``, or ``dellos10``.
|
||||||
|
|
||||||
Provider
|
Provider
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds support for configuring Dell OS10 Switches using the `dellemc.os10
|
||||||
|
Ansible collection <https://galaxy.ansible.com/dellemc/os10>`__. This is
|
||||||
|
integrated with the ``kayobe physical network configure`` command.
|
@ -7,3 +7,4 @@ PyYAML>=3.10.0 # MIT
|
|||||||
selinux # MIT
|
selinux # MIT
|
||||||
# INI parsing
|
# INI parsing
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
|
paramiko # LGPL
|
||||||
|
@ -3,6 +3,9 @@ collections:
|
|||||||
- name: https://opendev.org/openstack/ansible-collection-kolla
|
- name: https://opendev.org/openstack/ansible-collection-kolla
|
||||||
type: git
|
type: git
|
||||||
version: master
|
version: master
|
||||||
|
- name: dellemc.os10
|
||||||
|
version: 1.1.1
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- src: ahuffman.resolv
|
- src: ahuffman.resolv
|
||||||
version: 1.3.1
|
version: 1.3.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user