David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 1 | --- |
| 2 | - name: Openflow Agent Debian Archive |
| 3 | get_url: |
Charles Chan | 4016b8f | 2017-01-04 11:11:23 -0800 | [diff] [blame] | 4 | 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. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 5 | validate_certs: false |
Charles Chan | 4016b8f | 2017-01-04 11:11:23 -0800 | [diff] [blame] | 6 | dest: /mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 7 | |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 8 | - 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. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 15 | - name: OpenFlow Agent Stopped |
| 16 | service: name=ofdpa state=stopped |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 17 | 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. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 31 | |
| 32 | - name: Openflow Agent |
Charles Chan | 4016b8f | 2017-01-04 11:11:23 -0800 | [diff] [blame] | 33 | apt: deb="/mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb" force=true |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 34 | when: not lsb_stat.stat.exists or dist.stdout == "0" |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 35 | |
| 36 | - name: OpenFlow Agent Started |
| 37 | service: name=ofdpa state=started |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 38 | when: not lsb_stat.stat.exists or dist.stdout == "0" |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 39 | |