updates for prime step and local registry and switch prov
diff --git a/roles/fabric-switch/files/connect b/roles/fabric-switch/files/connect
index a114178..8fa37e8 100755
--- a/roles/fabric-switch/files/connect
+++ b/roles/fabric-switch/files/connect
@@ -10,8 +10,15 @@
   shift
 done
 
+IP=$(ping -c 1 {{ controller_ip }} 2>/dev/null | grep PING | awk '{print $3}' | sed -e 's/[\(\)]//g')
+while [ "$IP x" == " x" ]; do
+  echo "Waiting for controller to resolve ({{ controller_ip }}) ... sleeping 5s and will try again ..."
+  sleep 5
+  IP=$(ping -c 1 {{ controller_ip }} 2>/dev/null | grep PING | awk '{print $3}' | sed -e 's/[\(\)]//g')
+done
+
 if [ $BG -eq 1 ]; then
-  nohup brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller={{ controller_ip }} 2>&1 > connect.log &
+  nohup brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller=$IP 2>&1 > connect.log &
 else
-  brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller={{ controller_ip }}
+  brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller=$IP
 fi
diff --git a/roles/fabric-switch/tasks/main.yml b/roles/fabric-switch/tasks/main.yml
index 326219a..6bbb9df 100644
--- a/roles/fabric-switch/tasks/main.yml
+++ b/roles/fabric-switch/tasks/main.yml
@@ -1,20 +1,28 @@
 ---
-- name: Verify controller_ip Set
-  fail: msg="Please set variable 'controller_ip'. This can be set via a variable file or via the command line using the '--extra-vars' option."
-  when: controller_ip is not defined
+- name: Generate DPID
+  shell: ifconfig ma1 | grep HWaddr | awk '{ print "0x0000"$5 }' | sed s/://g
+  register: dpid
+  changed_when: false
 
-- name: Verify switch_id Set
-  fail: msg="Please set variable 'switch_id'. This can be set via a host specific variable file or via the command line using the '--extra-vars' option."
-  when: switch_id is not defined
+- name: Ensure ofdpa Config
+  set_fact:
+    switch_id: "{{ dpid.stdout }}"
+    controller_ip: "onos-fabric"
+
+- name: Verify Openflow Agent
+  shell: which ofdpa | wc -w
+  register: ofdpa_exists
+  changed_when: false
 
 - name: Openflow Agent Version
   shell: ofdpa --version
   register: ofdpa_version
   changed_when: false
+  when: ofdpa_exists.stdout != "0"
 
 - name: Version I.12.1.1+1.1 Openflow Agent
   include: ofdpa.yml
-  when: ofdpa_version.stdout.find('version I.12.1.1+1.1') == -1
+  when: ofdpa_exists.stdout == "0" or ofdpa_version.stdout.find('version I.12.1.1+1.1') == -1
 
 - name: Utilities Scripts
   template: