blob: efb1fb4cce9e80d68bdb7fa66b4337b5f23c7f25 [file] [log] [blame]
David K. Bainbridge317e7d72016-05-11 08:31:44 -07001---
2- name: Openflow Agent Debian Archive
3 get_url:
Charles Chan65074a02017-01-04 11:11:23 -08004 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 -07005 validate_certs: false
Charles Chan65074a02017-01-04 11:11:23 -08006 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 -07007
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -07008- name: Verify Service Exists
9 stat:
10 path: /etc/init.d/ofdpa
11 register: ofdpa_stat
12 changed_when: false
13 failed_when: false
14
David K. Bainbridge317e7d72016-05-11 08:31:44 -070015- name: OpenFlow Agent Stopped
16 service: name=ofdpa state=stopped
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070017 when: ofdpa_stat.stat.exists
18
19- name: Verify Distributeion Release File
20 stat:
21 path: /etc/lsb-release
22 register: lsb_stat
23 changed_when: false
24 failed_when: false
25
26- name: Verify Distribute Name
27 shell: grep -i ubuntu /etc/lsb-release | wc -l
28 register: dist
29 changed_when: false
30 failed_when: false
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031
32- name: Openflow Agent
Charles Chan65074a02017-01-04 11:11:23 -080033 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 -070034 when: not lsb_stat.stat.exists or dist.stdout == "0"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070035
36- name: OpenFlow Agent Started
37 service: name=ofdpa state=started
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070038 when: not lsb_stat.stat.exists or dist.stdout == "0"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070039