CORD-2788: Removing old connect-switch.yml playbook
Change-Id: I2c11d282a090fbdfbfe41308427bffcc3cfb687c
(cherry picked from commit 71a945bc819c956fa48a4fd427af3e7bd6c9d12b)
(cherry picked from commit 17089a7ab6c7303f3452f9585b335576155a46d2)
diff --git a/roles/head-node/files/connect-switch.yml b/roles/head-node/files/connect-switch.yml
deleted file mode 100644
index 18d9741..0000000
--- a/roles/head-node/files/connect-switch.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
----
-- name: Locate all switches
- hosts: localhost
- tasks:
- - name: Lookup DHCP harvest
- shell: cat /etc/bind/maas/dhcp_harvest.inc | grep -i " cc:37:ab\| 70:72:cf" | awk '{print $1}'
- register: switches
- changed_when: false
- - name: Add hosts into inventory
- add_host: name={{item}} group=fabric
- with_items: "{{switches.stdout_lines}}"
-
-- name: Connect all fabric switches to onos-fabric
- hosts: fabric
- remote_user: root
- tasks:
- - name: Check the status of indigo agent
- command: ps aux
- changed_when: false
- register: status
-
- - name: Terminate indigo agent
- command: /root/killit
- when: status.stdout.find('brcm-indigo-ofdpa-ofagent') != -1
-
- - name: Purge hardware tables
- command: /root/purge
- changed_when: true
-
- - name: Start indigo agent
- command: /root/connect -bg
- changed_when: true
-
- - name: Verify indigo agent has been started
- command: ps aux
- changed_when: false
- register: status
- failed_when: status.stdout.find('brcm-indigo-ofdpa-ofagent') == -1
diff --git a/roles/head-node/tasks/main.yml b/roles/head-node/tasks/main.yml
index 3aaec17..31c973d 100644
--- a/roles/head-node/tasks/main.yml
+++ b/roles/head-node/tasks/main.yml
@@ -99,17 +99,6 @@
group=maas
mode="0644"
-- name: Ensure Connect Switch Ansible Playbook
- become: yes
- copy:
- dest=/etc/maas/ansible/{{ item }}
- src=files/{{ item }}
- owner=maas
- group=maas
- mode="0644"
- with_items:
- - connect-switch.yml
-
- name: Ensure Dynamic Inventory Script
become: yes
template: