diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml new file mode 100644 index 00000000..e59ca37e --- /dev/null +++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml @@ -0,0 +1,40 @@ +--- + +- name: Install Crudini + apt: name={{ item }} state=present + with_items: + - crudini + +- name: shut down and disable Neutron's openvswitch agent services + service: name=neutron-plugin-openvswitch-agent state=stopped + +- name: remove Neutron's openvswitch agent services + shell: > + update-rc.d neutron-plugin-openvswitch-agent remove + +#- name: Stop the Open vSwitch service and clear existing OVSDB +# shell: > +# service openvswitch-switch stop ; +# rm -rf /var/log/openvswitch/* ; +# rm -rf /etc/openvswitch/conf.db ; +# service openvswitch-switch start ; + +- name: Set OpenDaylight as the manager + command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ HA_VIP }}:6640;" + +- name: start and disable Neutron's agent services + service: name=neutron-plugin-openvswitch-agent state=started + +- name: Configure Neutron1 + shell: > + crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight; + crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vlan; + +- name: Create ML2 Configuration File + template: + src: ml2_conf.sh + dest: "/opt/ml2_conf.sh" + mode: 0777 + +- name: Execute ML2 Configuration File + command: su -s /bin/sh -c "/opt/ml2_conf.sh;" |