Fix Dell OS6 and Dell OS9 switch configuration

Previously the dellos6_config and dellos9_config modules accepted the
name of a template file as their 'src' parameter, or a string containing
the actual config. Now they only accept the config string. Kayobe passes
the name of a template file, resulting in a strange error from the
switch about an invalid command dellos6-config.j2 or dellos9-config.j2.

This change fixes the issue in the same way it was fixed for Dell OS10
switches, by using the template lookup plugin to evaluate the config
file template.

Change-Id: Ic14e2b75c785b4db03b5e659e5a2be2ee83eace3
Closes-Bug: #2061102
This commit is contained in:
Mark Goddard 2024-04-12 10:17:19 +01:00
parent 0f78fcda30
commit 67f09241e0
2 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,7 @@
local_action: local_action:
module: dellos6_config module: dellos6_config
provider: "{{ dell_switch_provider }}" provider: "{{ dell_switch_provider }}"
src: dellos6-config.j2 src: "{{ lookup('template', 'dellos6-config.j2') }}"
save: "{{ dell_switch_save | bool }}" save: "{{ dell_switch_save | bool }}"
when: dell_switch_type == 'dellos6' when: dell_switch_type == 'dellos6'
@ -11,7 +11,7 @@
local_action: local_action:
module: dellos9_config module: dellos9_config
provider: "{{ dell_switch_provider }}" provider: "{{ dell_switch_provider }}"
src: dellos9-config.j2 src: "{{ lookup('template', 'dellos9-config.j2') }}"
save: "{{ dell_switch_save | bool }}" save: "{{ dell_switch_save | bool }}"
when: dell_switch_type == 'dellos9' when: dell_switch_type == 'dellos9'

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue where Dell OS6 and Dell OS9 switch configuration was not
applied correctly. `LP#2061102
<https://bugs.launchpad.net/kayobe/+bug/2061102>`__.