openstack-ansible-lxc_hosts/vars/redhat-7.yml
Major Hayden 7a92a1ee69
Use RDO instead of EPEL
Both RDO and EPEL repositories offer similar packages and this creates
conflicts at times, especially with RabbitMQ. This patch installs RDO
instead of EPEL to ensure that each container starts out with RDO and
not EPEL.

Some of the -devel packages are also removed that are no longer needed
now that we're installing LXC exclusively from packages on CentOS 7.

Related-bug: 1670012
Change-Id: I09ef74f1808e8883af2ecd6acab3b6418e7de1e6
2017-03-06 13:02:19 -06:00

92 lines
2.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.
system_config_dir: "/etc/sysconfig"
# Required rpm packages.
lxc_hosts_distro_packages:
- bridge-utils
- debootstrap
- dnsmasq
- git
- libseccomp
- libselinux
- libselinux-devel
- lxc
- lxc-devel
- lxc-libs
- lxc-templates
- policycoreutils-python
- selinux-policy-devel
- xz
lxc_xz_bin: xz
lxc_cache_map:
distro: centos
arch: amd64
release: 7
copy_from_host:
- /etc/yum.repos.d/
- /etc/yum/pluginconf.d/fastestmirror.conf
- /etc/pki/rpm-gpg/
- /etc/localtime
cache_prep_commands: |
{{ lxc_cache_prep_pre_commands }}
if [ -a /etc/resolv.conf ]; then
mv /etc/resolv.conf /etc/resolv.conf.org
fi
{% for resolver in lxc_cache_prep_dns %}
echo "nameserver {{ resolver }}" >> /etc/resolv.conf
{% endfor %}
yum install -y {{ lxc_cache_distro_packages | join(' ') }}
rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
wget https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata.rpm -O /tmp/rdo-release-ocata.rpm
/usr/bin/rpm -ivh /tmp/rdo-release-ocata.rpm || true
yum clean all
mkdir -p /var/backup
echo -e '{{ lxc_container_default_interfaces }}' | tee /etc/sysconfig/network-scripts/ifcfg-eth0
chage -I -1 -d -1 -m 0 -M 99999 -E -1 root
if [ -a /etc/resolv.conf.org ]; then
mv /etc/resolv.conf.org /etc/resolv.conf
else
rm -f /etc/resolv.conf
fi
{{ lxc_cache_prep_post_commands }}
lxc_cache_distro_packages:
- ca-certificates
- git
- openssh-server
- python-devel
- python2
- rsync
- sudo
- wget
- tar
- which
lxc_cached_network_interfaces:
- src: "lxc-net-ifcfg-bridge.cfg.j2"
dest: "/etc/sysconfig/network-scripts/ifcfg-lxcbr0"
lxc_container_default_interfaces: |
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=no
TYPE=Ethernet