From 67f09241e07b3119bb17ed59df2b40aa3c9dced9 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 12 Apr 2024 10:17:19 +0100 Subject: [PATCH] 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 --- ansible/roles/dell-switch/tasks/main.yml | 4 ++-- releasenotes/notes/bug-2061102-cbc4c65c14c09d55.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-2061102-cbc4c65c14c09d55.yaml diff --git a/ansible/roles/dell-switch/tasks/main.yml b/ansible/roles/dell-switch/tasks/main.yml index 9bc146b89..fc3d6268e 100644 --- a/ansible/roles/dell-switch/tasks/main.yml +++ b/ansible/roles/dell-switch/tasks/main.yml @@ -3,7 +3,7 @@ local_action: module: dellos6_config provider: "{{ dell_switch_provider }}" - src: dellos6-config.j2 + src: "{{ lookup('template', 'dellos6-config.j2') }}" save: "{{ dell_switch_save | bool }}" when: dell_switch_type == 'dellos6' @@ -11,7 +11,7 @@ local_action: module: dellos9_config provider: "{{ dell_switch_provider }}" - src: dellos9-config.j2 + src: "{{ lookup('template', 'dellos9-config.j2') }}" save: "{{ dell_switch_save | bool }}" when: dell_switch_type == 'dellos9' diff --git a/releasenotes/notes/bug-2061102-cbc4c65c14c09d55.yaml b/releasenotes/notes/bug-2061102-cbc4c65c14c09d55.yaml new file mode 100644 index 000000000..e14931bac --- /dev/null +++ b/releasenotes/notes/bug-2061102-cbc4c65c14c09d55.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue where Dell OS6 and Dell OS9 switch configuration was not + applied correctly. `LP#2061102 + `__.