389d631500
In Ansible, a "string"|bool jinja2 filter does not result to a true value as presented below: ~$ ansible localhost -e foo="string" -m debug -a "msg={{foo|bool}}" localhost | SUCCESS => { "msg": false } Only a "true" string results in a boolean True value ~$ ansible localhost -e foo="true" -m debug -a "msg={{foo|bool}}" localhost | SUCCESS => { "msg": true } as such, the routing files where never installed for the RedHat distributions. We fix this logic by simply leaving this variable undefined for the distributions who don't need it. Change-Id: I0af0ad47487365ad593c5550d2c7e05f650e7174
34 lines
1.4 KiB
YAML
34 lines
1.4 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# 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.
|
|
|
|
# Note this is a used in an iterable and requires the <item.value.interface> variable
|
|
# The container interface variable is a a default object that assume the
|
|
# Ansible iterator type is `with_dict`.
|
|
lxc_container_interface: debian-interface.cfg.j2
|
|
|
|
# Note this is a used in an iterable and requires the <item.value.interface> variable
|
|
lxc_container_interface_target: "/etc/network/interfaces.d/{{ item.value.interface }}.cfg"
|
|
|
|
lxc_container_map:
|
|
distro: ubuntu
|
|
arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_architecture'] | lower ) }}"
|
|
release: xenial
|
|
|
|
lxc_container_default_postup:
|
|
# needed to enable gratuitous arps on interface events
|
|
- "sysctl -w net.ipv4.conf.$IFACE.arp_notify=1"
|
|
# needed to force an interface event (setting mac to what it already is)
|
|
- "ip link set $IFACE address $(cat /sys/class/net/$IFACE/address)"
|