--- - include_vars: "{{ ansible_os_family }}.yml" - name: Install ODL Cluster on Controller include: odl_controller.yml when: inventory_hostname in groups['odl'] - name: Install ODL Cluster on Compute include: openvswitch.yml when: groups['odl']|length !=0 and inventory_hostname not in groups['odl'] - meta: flush_handlers - name: check out new flow table if enable shell: ovs-ofctl --protocol=OpenFlow13 dump-flows br-prv | grep CONTROLLER; while [ $? -ne 0 ]; do sleep 10; ovs-ofctl --protocol=OpenFlow13 dump-flows br-prv | grep CONTROLLER; done when: groups['odl']|length !=0 - name: remove controller from br-prv shell: ovs-vsctl del-controller br-prv; when: groups['odl']|length !=0