-##############################################################################
+# #############################################################################
# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
+# #############################################################################
---
- hosts: all
remote_user: root
- role: setup-infrastructure
- role: setup-openstack
- role: setup-openvswitch
- when: NEUTRON_MECHANISM_DRIVERS[0] == "openvswitch" or
+ when: NEUTRON_MECHANISM_DRIVERS[0] == "openvswitch" or
NEUTRON_MECHANISM_DRIVERS[0] == "opendaylight"
- role: openstack-post
METADATA_SECRET: metadata_secret
INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS: 10.1.1.21
INTERFACE_NAME: eth2
-DNS: 8.8.8.8
EXTERNAL_NETWORK_CIDR: 203.0.113.0/24
EXTERNAL_NETWORK_GATEWAY: 203.0.113.1
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-- name: remove resolv.conf
- file: "dest=/etc/resolv.conf state=absent"
-
-- name: make a symbolic link
- shell: "ln -s /var/run/resolvconf/resolv.conf /etc/resolv.conf"
-
- name: configure network
template:
src: compute.j2
# -- Putting this here is primarily for tempest to work.
address {{host_info[inventory_hostname].VLAN_IP_SECOND}}
netmask 255.255.252.0
- dns-nameservers {{ DNS }}
-# compute1 Storage bridge
+# compute storage bridge
auto br-storage
iface br-storage inet static
bridge_stp off
address {{ ip_settings[inventory_hostname]["br-prv"]["ip"] }}
netmask 255.255.255.0
gateway {{ ip_settings[inventory_hostname]["br-prv"]["gw"] }}
- dns-nameservers {{ DNS }}
# compute1 Storage bridge
auto br-storage
name: neutron-openvswitch-agent
state: stopped
+ # yamllint disable rule:line-length
- name: change the openvswitch_agent.ini
lineinfile:
dest: /etc/neutron/plugins/ml2/openvswitch_agent.ini
insertafter: '^bridge_mappings'
line: "local_ip = {{ hostvars[inventory_hostname]['container_networks']['tunnel_address']['address'] }}"
when:
- - inventory_hostname not in groups['nova_compute']
+ - inventory_hostname not in groups['nova_compute']
- name: change the openvswitch_agent.ini
lineinfile:
notify:
- Restart neutron-openvswitch-agent
when:
- - inventory_hostname in groups['nova_compute']
+ - inventory_hostname in groups['nova_compute']
+ # yamllint enable rule:line-length
- name: Setup br-provider
openvswitch_bridge:
notify:
- Restart neutron-openvswitch-agent
when:
- - inventory_hostname not in groups['nova_compute']
+ - inventory_hostname not in groups['nova_compute']
- name: Add port to br-provider
openvswitch_port:
notify:
- Restart neutron-openvswitch-agent
when:
- - inventory_hostname not in groups['nova_compute']
+ - inventory_hostname not in groups['nova_compute']
handlers:
- name: Restart neutron-openvswitch-agent
-##############################################################################
+# #############################################################################
# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
+# #############################################################################
---
- name: create osa log directory
file:
- name: copy user_variables
template:
- src: user_variables.yml
+ src: user_variables.yml.j2
dest: /etc/openstack_deploy/user_variables.yml
- name: copy cinder.yml
- name: generate create-network.yml
template:
- src: create-network.yml.j2
- dest: /opt/openstack-ansible/playbooks/create-network.yml
+ src: create-network.yml.j2
+ dest: /opt/openstack-ansible/playbooks/create-network.yml
- name: generate create-flavor.yml
template:
- src: create-flavor.yml.j2
- dest: /opt/openstack-ansible/playbooks/create-flavor.yml
+ src: create-flavor.yml.j2
+ dest: /opt/openstack-ansible/playbooks/create-flavor.yml
- name: copy http.yml
copy:
{% if "openvswitch" == NEUTRON_MECHANISM_DRIVERS[0] or
"opendaylight" == NEUTRON_MECHANISM_DRIVERS[0]
- %}
+%}
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH="
-##############################################################################
+# #############################################################################
# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
+# #############################################################################
---
- name: setup hosts
shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
-e force_containers_data_destroy=yes > /dev/null;"
with_items:
- "{{ failed_container.stdout_lines }}"
- ignore_errors: True
+ ignore_errors: "True"
- name: retry to setup failed_container
shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
cluster_name: $cluster_name
-DNS: 8.8.8.8
odl_controller: 10.1.0.15
DEBUG: true