openstack-ansible/inventory/group_vars/neutron_calico_dhcp_agent.yml
Jimmy McCrory c5551f2c8c Move inventory files to folder in root of repo
Move the playbooks/inventory folder, group_vars, and host_vars to
inventory/ in the root of the OpenStack-Ansible repo. This helps better
organize the repo structure since playbooks/ will now only contain
playbooks, shared task files, and included repo package var files.

group_vars and host_vars are moved alongside the inventory since that's
the default place that Ansible expects those folders and to help better
prepare for Ansible 2.4 where multiple inventories can be loaded,
automatically including relative group and host var files.

Effected docs, scripts, and variables have been updated with the new
paths.

Change-Id: If50e2412c3fd6575d7041deb8ecc9480b04184cc
2017-12-16 02:34:33 -08:00

108 lines
3.4 KiB
YAML

---
# Copyright 2016, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Based on the default Calico BIRD template at
# https://github.com/projectcalico/felix/blob/master/etc/bird/calico-bird.conf.template
# BGP peer configuration for Calico by default will attempt to configure peering
# sessions with the host's default gateway over IPv4/IPv6. This is just one
# example of the various BGP peering configurations that could be used here
# and should be customized further to match the deployer's upstream BGP
# configuration. Calico has documented some example BGP topologies at:
# http://docs.projectcalico.org/master/reference/private-cloud/l2-interconnect-fabric
# http://docs.projectcalico.org/master/reference/private-cloud/l3-interconnect-fabric
# Set to your iBGP ASN
bird_bgp_asn: 65000
bird_bgp_ipv4_peer_ip: "{{ ansible_default_ipv4['gateway'] }}"
#calculate the first address in the subnet since the IPv6 "gateway" may be a
#link local address that we cannot peer to.
bird_bgp_ipv6_peer_ip: >-
{% if ansible_default_ipv6['address'] is defined
and ansible_default_ipv6['prefix'] is defined %}
{{
((ansible_default_ipv6['address'] ~ '/' ~ ansible_default_ipv6['prefix']) |
ipaddr('network') ~ '/' ~ ansible_default_ipv6['prefix']
) | ipaddr('net') | ipaddr(1) | ipaddr('address')
}}
{% endif %}
bird_ipv4_protocols:
kernel: |
learn;
persist;
scan time 2;
graceful restart;
device: |
scan time 2;
direct: |
interface "-dummy0", "dummy1", "eth*", "em*", "en*";
bgp:
UPLINK: |
description "Connection to BGP route reflector";
local as {{ bird_bgp_asn }};
neighbor {{ bird_bgp_ipv4_peer_ip }} as {{ bird_bgp_asn }};
hold time 15;
graceful restart;
check link;
direct;
gateway direct;
export filter export_bgp;
next hop self;
bird_ipv6_protocols:
kernel: |
learn;
persist;
scan time 2;
graceful restart;
device: |
scan time 2;
direct: |
interface "-dummy0", "dummy1", "eth*", "em*", "en*";
bgp:
UPLINK: |
description "Connection to BGP route reflector";
local as {{ bird_bgp_asn }};
neighbor {{ bird_bgp_ipv6_peer_ip }} as {{ bird_bgp_asn }};
hold time 15;
graceful restart;
check link;
direct;
gateway direct;
export filter export_bgp;
next hop self;
#configure bird to advertise subnets bound to these interface wildcards
bird_advertise_interfaces:
- 'tap*'
- 'cali*'
- 'dummy1'
bird_ipv4_filters:
export_bgp: |
if ( {% for i in bird_advertise_interfaces %}(ifname ~ "{{ i }}"){% if not loop.last %} || {% endif %}{% endfor %} ) then {
if net != 0.0.0.0/0 then accept;
}
reject;
bird_ipv6_filters:
export_bgp: |
if ( {% for i in bird_advertise_interfaces %}(ifname ~ "{{ i }}"){% if not loop.last %} || {% endif %}{% endfor %} ) then {
if net != ::/0 then accept;
}
reject;