Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 1 | --- |
Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame] | 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 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 16 | - name: Verify Openflow Agent |
| 17 | shell: which ofagentapp | wc -w |
| 18 | register: ofdpa_exists |
Jonathan Hart | 1728fc8 | 2017-08-22 12:47:10 -0700 | [diff] [blame] | 19 | tags: |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 20 | - skip_ansible_lint # We're just gathering info |
Jonathan Hart | 1728fc8 | 2017-08-22 12:47:10 -0700 | [diff] [blame] | 21 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 22 | - name: Install OFDPA for Accton switches |
| 23 | include: ofdpa-accton.yml |
| 24 | when: |
| 25 | - platform in platforms.accton_switches.names |
| 26 | - ofdpa_exists.stdout == "0" |
| 27 | |
| 28 | - name: Install OFDPA for Quanta switches |
| 29 | include: ofdpa-quanta.yml |
| 30 | when: |
| 31 | - platform in platforms.quanta_switches.names |
| 32 | - ofdpa_exists.stdout == "0" |
| 33 | |
| 34 | - name: Generate DPID |
| 35 | shell: ifconfig | grep HWaddr | head -1 | awk '{ print "0x0000"$5 }' | sed s/://g |
| 36 | register: dpid |
Jonathan Hart | 1728fc8 | 2017-08-22 12:47:10 -0700 | [diff] [blame] | 37 | tags: |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 38 | - skip_ansible_lint # We're just gathering info |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 39 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame] | 40 | - name: Ensure OFDPA Config |
| 41 | set_fact: |
| 42 | switch_id: "{{ dpid.stdout }}" |
| 43 | controller_ip: "onos-fabric" |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 44 | |
Luca Prete | 57e7627 | 2017-12-11 14:15:08 -0800 | [diff] [blame] | 45 | - name: Utilities Scripts |
| 46 | template: |
| 47 | src: "{{ item }}" |
| 48 | dest: /root |
| 49 | owner: root |
| 50 | group: root |
| 51 | mode: "0755" |
| 52 | with_items: |
| 53 | - killit |
| 54 | - connect |