Merge "Add pod.yaml files for Apex"
[yardstick.git] / ansible / roles / infra_deploy_openstack / tasks / configure_openstack.yml
1 # Copyright (c) 2018 Intel Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15 - name: Create folders
16   file:
17     path: "{{ item }}"
18     state: directory
19   with_items:
20     - /etc/kolla/config/nova
21     - /etc/kolla/config/neutron
22
23 - set_fact:
24     filter_ops: RetryFilter,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter
25
26 - name: Configure OpenStack Nova
27   copy:
28     content: |
29       [filter_scheduler]
30       enabled_filters = {{ filter_ops }}
31       [libvirt]
32       cpu_mode = host-passthrough
33     dest: /etc/kolla/config/nova.conf
34
35 - name: Configure OpenStack Neutron
36   copy:
37     content: |
38       [DEFAULT]
39       service_plugins=neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
40       [securitygroup]
41       firewall_driver = neutron.agent.firewall.NoopFirewallDriver
42       [ml2]
43       extension_drivers=port_security
44       [agent]
45       extensions=port_security
46     dest: /etc/kolla/config/neutron.conf
47
48 - name: Configure OpenStack ml2_plugin.ini
49   copy:
50     content: |
51       [ml2]
52       tenant_network_types = vxlan
53       extension_drivers = port_security
54       type_drivers = vlan,flat,local,vxlan
55       mechanism_drivers = openvswitch
56       [ml2_type_flat]
57       flat_networks = physnet1
58       [ml2_type_vlan]
59       network_vlan_ranges = physnet1
60       [securitygroup]
61       firewall_driver = iptables_hybrid
62       [ovs]
63       datapath_type = system
64       bridge_mappings = physnet1:br-ex
65       tunnel_bridge = br-tun
66       local_ip = {{ deployvm_ip }}
67     dest: /etc/kolla/config/neutron/ml2_plugin.ini