blob: f663ed159fa7f91cb9f83eb2078e8e8b056b9ee3 [file] [log] [blame]
Luca Prete0a2430f2018-02-01 17:17:36 -08001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16- name: Check that Voltha BAL driver Debian Archive exists
17 stat:
18 path: "{{ platforms.accton_olts.file_url }}"
19 register: bal_driver_on_server
20
21- name: Verify Voltha BAL Driver presence
22 command: dpkg --list | grep asfvolt16
23 register: bal
24 when:
25 - bal_driver_on_server.stat.exists
26
27- name: Copy Voltha BAL Driver Debian Archive
28 get_url:
29 url: "{{ platforms.accton_olts.file_url }}"
30 validate_certs: false
31 dest: "{{ deb_tmp_inst_dir }}{{ platforms.accton_olts.file_name }}"
32 when:
33 - bal.stdout.find('asfvolt16') == -1
34 - bal_driver_on_server.stat.exists
35
36- name: Install Voltha BAL Driver
37 apt: deb="{{ deb_tmp_inst_dir }}{{ platforms.accton_olts.file_name }}" force=true
38 when:
39 - bal.stdout.find('asfvolt16') == -1
40 - bal_driver_on_server.stat.exists