Fixing OFDPA installation scripts
Change-Id: Iba0b8298cda540af18e354d626ddb1915adc7c22
diff --git a/roles/fabric-switch/defaults/main.yml b/roles/fabric-switch/defaults/main.yml
index 9526484..9b7ebc1 100644
--- a/roles/fabric-switch/defaults/main.yml
+++ b/roles/fabric-switch/defaults/main.yml
@@ -18,13 +18,13 @@
pub_ssh_key: "{{ lookup('file', pub_ssh_key_file_location+'/cord_rsa.pub') }}"
switch_ouis:
- - accton:
+ accton:
- "cc37ab"
- "7072cf"
- "c4393a"
- "8cea1b"
- "a82bb5"
- "480fcf"
- - qct:
+ qct:
- "2c600c"
- "54ab3a"
diff --git a/roles/fabric-switch/tasks/main.yml b/roles/fabric-switch/tasks/main.yml
index 5d0f769..818828c 100644
--- a/roles/fabric-switch/tasks/main.yml
+++ b/roles/fabric-switch/tasks/main.yml
@@ -47,19 +47,17 @@
- name: Install OFDPA for Accton switches
include: ofdpa-accton.yml lsb_stat="{{ lsb_stat }}" dist="{{ dist }}"
- with_items: "{{ switch_ouis.accton|default([]) }}"
when:
- ofdpa_exists.stdout == "0" or ofdpa_version.stderr.find('3.0.4.0') == -1
# Accton related OUIs
- - oui.stdout == item
+ - oui.stdout in switch_ouis['accton']
- name: Install OFDPA for QCT switches
include: ofdpa-qct.yml lsb_stat="{{ lsb_stat }}" dist="{{ dist }}"
- with_items: "{{ switch_ouis.qct|default([]) }}"
when:
- ofdpa_exists.stdout == "0" or ofdpa_version.stderr.find('3.0.5.0') == -1
- # Accton related OUIs
- - oui.stdout == item
+ # QCT related OUIs
+ - oui.stdout in switch_ouis['qct']
- name: Authorize SSH Key
become: yes