blob: c367e18ede0896d560d5d0fd623d49a039281463 [file] [log] [blame]
Luca Prete0a2430f2018-02-01 17:17:36 -08001---
Jonathan Hart93956f52017-08-22 13:12:42 -07002# 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 Prete0a2430f2018-02-01 17:17:36 -080016- name: Verify Openflow Agent
17 shell: which ofagentapp | wc -w
18 register: ofdpa_exists
Jonathan Hart1728fc82017-08-22 12:47:10 -070019 tags:
Luca Prete0a2430f2018-02-01 17:17:36 -080020 - skip_ansible_lint # We're just gathering info
Jonathan Hart1728fc82017-08-22 12:47:10 -070021
Luca Prete0a2430f2018-02-01 17:17:36 -080022- 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 Hart1728fc82017-08-22 12:47:10 -070037 tags:
Luca Prete0a2430f2018-02-01 17:17:36 -080038 - skip_ansible_lint # We're just gathering info
David K. Bainbridge317e7d72016-05-11 08:31:44 -070039
Luca Prete0a2430f2018-02-01 17:17:36 -080040- name: Ensure OFDPA Config
41 set_fact:
42 switch_id: "{{ dpid.stdout }}"
43 controller_ip: "onos-fabric"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070044
Luca Prete57e76272017-12-11 14:15:08 -080045- 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