blob: 9d8fb43457462e32ecc291881fd465660aa9f24e [file] [log] [blame]
Jonathan Hart93956f52017-08-22 13:12:42 -07001
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
David K. Bainbridge317e7d72016-05-11 08:31:44 -070016---
Jonathan Hart1728fc82017-08-22 12:47:10 -070017# We want to kill old agents and stop the old OFDPA service before removing
18- name: OpenFlow Agent Is Not Running
19 command: killall ofagentapp
20 failed_when: false
21 tags:
22 - skip_ansible_lint # there's no harm to run killall if process is not running
23
24- name: Old OFDPA Is Not Running
25 command: killall -9 brcm-indigo-ofdpa-ofagent
26 failed_when: false
27 tags:
28 - skip_ansible_lint # there's no harm to run killall if process is not running
David K. Bainbridge317e7d72016-05-11 08:31:44 -070029
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070030- name: Verify Service Exists
31 stat:
32 path: /etc/init.d/ofdpa
33 register: ofdpa_stat
34 changed_when: false
35 failed_when: false
36
David K. Bainbridge317e7d72016-05-11 08:31:44 -070037- name: OpenFlow Agent Stopped
38 service: name=ofdpa state=stopped
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070039 when: ofdpa_stat.stat.exists
40
Jonathan Hart1728fc82017-08-22 12:47:10 -070041- name: OFDPA 3.0 EA0 Is Not Present
42 apt:
43 name: ofdpa-3.0-ea0
44 state: absent
45 force: yes
46 purge: yes
47
48- name: Verify Distribution Release File
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070049 stat:
50 path: /etc/lsb-release
51 register: lsb_stat
52 changed_when: false
53 failed_when: false
54
Luca Prete57e76272017-12-11 14:15:08 -080055- name: Verify Distribute Release Name
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070056 shell: grep -i ubuntu /etc/lsb-release | wc -l
57 register: dist
58 changed_when: false
59 failed_when: false
David K. Bainbridge317e7d72016-05-11 08:31:44 -070060
Luca Prete57e76272017-12-11 14:15:08 -080061- name: Utilities Scripts
62 template:
63 src: "{{ item }}"
64 dest: /root
65 owner: root
66 group: root
67 mode: "0755"
68 with_items:
69 - killit
70 - connect