openstack-ansible-lxc_conta.../vars/suse.yml

67 lines
2.6 KiB
YAML

---
# Copyright 2016, Rackspace US, Inc.
# Copyright 2017, SUSE LINUX GmbH.
#
# 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: suse-interface.j2
lxc_container_route_interface: suse-routes.j2
lxc_container_default_route_interfaces: "/etc/sysconfig/network/ifroute-{{ item.value.interface }}"
lxc_container_default_interface: "/etc/sysconfig/network/ifcfg-eth0"
# Note this is a used in an iterable and requires the <item.value.interface> variable
lxc_container_interface_target: "/etc/sysconfig/network/ifcfg-{{ item.value.interface }}"
lxc_container_enable_resolved: false
lxc_container_map:
distro: opensuse
arch: amd64
release: "{{ hostvars[physical_host]['ansible_distribution_version'] }}"
lxc_container_default_config_list:
- "lxc.start.auto=1"
- "lxc.start.delay=15"
- "lxc.group=onboot"
- "lxc.group=openstack"
- "lxc.autodev=1"
- "lxc.pts=1024"
- "lxc.kmsg=0"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
### REMOVE IN "S"
# The machine-id is not removed in the base container. Remove the machine-id
# command when the base container no longer has a stored id.
# The wicked* need to be disabled. Once this is taken care of in the base image
# this set of commands can be removed.
_lxc_container_extra_commands: |
if [[ ! -f /etc/machine-id.generated ]]; then
rm /etc/machine-id || true
rm /var/lib/dbus/machine-id || true
/usr/bin/systemd-machine-id-setup
cp /etc/machine-id /var/lib/dbus/machine-id
touch /etc/machine-id.generated
fi
for action in disable mask; do
systemctl ${action} wicked.service || true
systemctl ${action} wickedd.service || true
systemctl ${action} wickedd-auto4.service || true
systemctl ${action} wickedd-dhcp4.service || true
systemctl ${action} wickedd-dhcp6.service || true
systemctl ${action} wickedd-nanny.service || true
done
systemctl enable systemd-networkd