| - name: Locate all switches |
| - name: Lookup DHCP harvest |
| shell: cat /etc/bind/maas/dhcp_harvest.inc | grep -i " cc:37:ab\| 70:72:cf" | awk '{print $1}' |
| - name: Add hosts into inventory |
| add_host: name={{item}} group=fabric |
| with_items: "{{switches.stdout_lines}}" |
| - name: Connect all fabric switches to onos-fabric |
| - name: Check the status of indigo agent |
| - name: Terminate indigo agent |
| when: status.stdout.find('brcm-indigo-ofdpa-ofagent') != -1 |
| - name: Purge hardware tables |
| - name: Start indigo agent |
| command: /root/connect -bg |
| - name: Verify indigo agent has been started |
| failed_when: status.stdout.find('brcm-indigo-ofdpa-ofagent') == -1 |