blob: 48b0effb76c3a4016c663b73452ef72ad714caa2 [file] [log] [blame]
Jonathan Hart93956f52017-08-22 13:12:42 -07001
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
David K. Bainbridge317e7d72016-05-11 08:31:44 -070017---
18- name: Openflow Agent Debian Archive
19 get_url:
Charles Chan4016b8f2017-01-04 11:11:23 -080020 url: https://github.com/onfsdn/atrium-docs/raw/master/16A/ONOS/builds/ofdpa-3.0-ea0_3.0.0.0%2Baccton1.0-1_amd64.deb
David K. Bainbridge317e7d72016-05-11 08:31:44 -070021 validate_certs: false
Charles Chan4016b8f2017-01-04 11:11:23 -080022 dest: /mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb
David K. Bainbridge317e7d72016-05-11 08:31:44 -070023
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070024- name: Verify Service Exists
25 stat:
26 path: /etc/init.d/ofdpa
27 register: ofdpa_stat
28 changed_when: false
29 failed_when: false
30
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031- name: OpenFlow Agent Stopped
32 service: name=ofdpa state=stopped
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070033 when: ofdpa_stat.stat.exists
34
35- name: Verify Distributeion Release File
36 stat:
37 path: /etc/lsb-release
38 register: lsb_stat
39 changed_when: false
40 failed_when: false
41
42- name: Verify Distribute Name
43 shell: grep -i ubuntu /etc/lsb-release | wc -l
44 register: dist
45 changed_when: false
46 failed_when: false
David K. Bainbridge317e7d72016-05-11 08:31:44 -070047
48- name: Openflow Agent
Charles Chan4016b8f2017-01-04 11:11:23 -080049 apt: deb="/mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb" force=true
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070050 when: not lsb_stat.stat.exists or dist.stdout == "0"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070051
52- name: OpenFlow Agent Started
53 service: name=ofdpa state=started
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070054 when: not lsb_stat.stat.exists or dist.stdout == "0"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070055