blob: e55aa6bd4ddef40a5f6ecb8d522a8afee648968a [file] [log] [blame]
David K. Bainbridge317e7d72016-05-11 08:31:44 -07001---
David K. Bainbridgef4181702016-06-17 14:44:03 -07002- name: Generate DPID
3 shell: ifconfig ma1 | grep HWaddr | awk '{ print "0x0000"$5 }' | sed s/://g
4 register: dpid
5 changed_when: false
David K. Bainbridge317e7d72016-05-11 08:31:44 -07006
David K. Bainbridgef4181702016-06-17 14:44:03 -07007- name: Ensure ofdpa Config
8 set_fact:
9 switch_id: "{{ dpid.stdout }}"
10 controller_ip: "onos-fabric"
11
12- name: Verify Openflow Agent
13 shell: which ofdpa | wc -w
14 register: ofdpa_exists
15 changed_when: false
David K. Bainbridge317e7d72016-05-11 08:31:44 -070016
17- name: Openflow Agent Version
David K. Bainbridge17248c02016-08-29 17:04:34 -070018 command: ofdpa --version
David K. Bainbridge317e7d72016-05-11 08:31:44 -070019 register: ofdpa_version
20 changed_when: false
David K. Bainbridgef4181702016-06-17 14:44:03 -070021 when: ofdpa_exists.stdout != "0"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070022
Charles Chan4016b8f2017-01-04 11:11:23 -080023# Note: This is the version number of OFDPA 3.0 EA0
24- name: Version 2.0.4.0 Openflow Agent
David K. Bainbridge317e7d72016-05-11 08:31:44 -070025 include: ofdpa.yml
Charles Chan4016b8f2017-01-04 11:11:23 -080026 when: ofdpa_exists.stdout == "0" or ofdpa_version.stdout.find('version 2.0.4.0') == -1
David K. Bainbridge317e7d72016-05-11 08:31:44 -070027
28- name: Utilities Scripts
29 template:
David K. Bainbridgebd1aa672016-11-09 13:15:29 -080030 src: "{{ item }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031 dest: /root
32 owner: root
33 group: root
David K. Bainbridge8b179042016-11-30 15:38:42 -080034 mode: "0755"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070035 with_items:
36 - purge
37 - killit
38 - connect
39 - reset
40 register: utils
41
Charles Chanaba1b562016-08-01 16:33:07 -070042- name: Authorize SSH Key
43 become: yes
44 authorized_key:
45 key={{ pub_ssh_key }}
46 user=root
47 state=present
48 register: sshkey
49