blob: f010deb8d997143287d38507282de2f62e722d11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
---
#- name: Install Crudini
# apt: name={{ item }} state=present
# with_items:
# - crudini
- name: install compute packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: compute_packages | union(compute_packages_noarch)
- name: Adjust Service Daemon
shell: >
sed -i '/neutron-plugin-openvswitch-agent/d' /opt/service ;
echo opendaylight >> /opt/service ;
- name: shut down and disable Neutron's openvswitch agent services
service: name=neutron-plugin-openvswitch-agent state=stopped
- name: Stop the Open vSwitch service and clear existing OVSDB
shell: >
ovs-vsctl del-br br-int ;
ovs-vsctl del-br br-tun ;
ovs-vsctl del-manager ;
#- 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:{{ internal_vip.ip }}: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 vxlan;
#- name: Adjust Service Daemon
# shell: >
# sed -i '/neutron-plugin-openvswitch-agent/d' /opt/service ;
# echo opendaylight >> /opt/service ;
- 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;"
|