Skip to content

Commit aa5b4d0

Browse files
authored
[fanout connect playbook] Fix variable undefined in rootfanout_connect.yml (#16634)
Summary: Fixes # (issue) In PR: #15643, it add a new optional variable clean_before_add for template arista_7260_connect.j2 to indicate whether clean vlan range before add vlan range, however, this variable are defined in fanout_connect.yml which will call rootfanout_connect.yml, this will be a bug, because when rootfanout_connect.yml is called by other playbook, it will raise error: clean_before_add undefined, so, to fix this bug, we move the clean_before_add definition from fanout_connect.yml to rootfanout_connect.yml. What is the motivation for this PR? this will be a bug, because when rootfanout_connect.yml is called by other playbook, it will raise error: clean_before_add undefined How did you do it? move the clean_before_add definition from fanout_connect.yml to rootfanout_connect.yml. How did you verify/test it? local run playbook
1 parent 3481eaf commit aa5b4d0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ansible/fanout_connect.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
- set_fact:
1212
server: "{{ inventory_hostname|lower }}"
1313
server_port: "{{ external_port }}"
14-
clean_before_add: "{{ clean_before_add | default('y') }}"
1514

1615
- set_fact: root_fanout_connect=true
1716
when: root_fanout_connect is not defined

ansible/roles/fanout/tasks/rootfanout_connect.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- set_fact: dut="{{ leaf_name }}"
88
when: deploy_leaf
99

10+
- set_fact:
11+
clean_before_add: "{{ clean_before_add | default('y') }}"
12+
1013
- debug: msg="Configuring fanout switch for {{ dut }}"
1114

1215
- name: Gathering connection facts about the DUTs or leaffanout device

0 commit comments

Comments
 (0)