switches: add flag to save configuration on Dell switches

Currently only supported on Dell OS9 and OS10 switches, and provides no
CLI integration.

Change-Id: Ia9242ed823868cba3a27fb9344a3b01283528d87
This commit is contained in:
Mark Goddard 2022-10-25 14:29:50 +01:00
parent bd9043dca0
commit 35259800aa
6 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,3 @@
---
# Whether to save switch configuration after it has been applied.
switch_config_save: false

View File

@ -122,6 +122,7 @@
dell_switch_provider: "{{ switch_dellos_provider }}"
dell_switch_config: "{{ switch_config }}"
dell_switch_interface_config: "{{ switch_interface_config }}"
dell_switch_save: "{{ switch_config_save }}"
- name: Ensure Dell PowerConnect physical switches are configured
hosts: switches_of_type_dell-powerconnect:&switches_in_display_mode_False

View File

@ -12,3 +12,6 @@ dell_switch_config: []
# dicts. Each dict contains a 'description' item and a 'config' item which
# should contain a list of per-interface configuration.
dell_switch_interface_config: {}
# Whether to save the configuration.
dell_switch_save: false

View File

@ -4,6 +4,7 @@
module: dellos6_config
provider: "{{ dell_switch_provider }}"
src: dellos6-config.j2
save: "{{ dell_switch_save | bool }}"
when: dell_switch_type == 'dellos6'
- name: Ensure DellOS9 switches are configured
@ -11,6 +12,7 @@
module: dellos9_config
provider: "{{ dell_switch_provider }}"
src: dellos9-config.j2
save: "{{ dell_switch_save | bool }}"
when: dell_switch_type == 'dellos9'
- name: Ensure DellOS10 switches are configured
@ -18,4 +20,5 @@
module: dellos10_config
provider: "{{ dell_switch_provider }}"
src: "{{ lookup('template', 'dellos10-config.j2') }}"
save: "{{ dell_switch_save | bool }}"
when: dell_switch_type == 'dellos10'

View File

@ -229,6 +229,9 @@ Configuration for these devices is applied using the ``dellos6_config``,
``switch_type`` should be set to ``dellos6``, ``dellos9``, or ``dellos10``.
``switch_config_save`` may be set to ``true`` to enable saving configuration
after it has been applied.
Provider
^^^^^^^^

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds support for saving configuration to switches when running ``kayobe
physical network configure``. Currently only supported on Dell OS9 and OS10
devices.