Refactoring switch provisioning: moving Accton to new ONL and OFDPA. Introducing support for OLTs provisioning
Change-Id: I6500be973b25510df5346d9140985f6487f2031d
diff --git a/roles/fabric-switch/tasks/olt-accton.yml b/roles/fabric-switch/tasks/olt-accton.yml
new file mode 100644
index 0000000..f663ed1
--- /dev/null
+++ b/roles/fabric-switch/tasks/olt-accton.yml
@@ -0,0 +1,40 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: Check that Voltha BAL driver Debian Archive exists
+ stat:
+ path: "{{ platforms.accton_olts.file_url }}"
+ register: bal_driver_on_server
+
+- name: Verify Voltha BAL Driver presence
+ command: dpkg --list | grep asfvolt16
+ register: bal
+ when:
+ - bal_driver_on_server.stat.exists
+
+- name: Copy Voltha BAL Driver Debian Archive
+ get_url:
+ url: "{{ platforms.accton_olts.file_url }}"
+ validate_certs: false
+ dest: "{{ deb_tmp_inst_dir }}{{ platforms.accton_olts.file_name }}"
+ when:
+ - bal.stdout.find('asfvolt16') == -1
+ - bal_driver_on_server.stat.exists
+
+- name: Install Voltha BAL Driver
+ apt: deb="{{ deb_tmp_inst_dir }}{{ platforms.accton_olts.file_name }}" force=true
+ when:
+ - bal.stdout.find('asfvolt16') == -1
+ - bal_driver_on_server.stat.exists