Remove LXC yum repo from containers

Ths LXC yum repository is being added to containers during the
cach prep step on CentOS. This causes delays/failures in the
containers and it's only needed on hosts.

Closes-Bug: 1737202
Change-Id: I3fdc313a43daae938357230cf99e2992ede11e01
(cherry picked from commit 84c08cfe94)
This commit is contained in:
Major Hayden 2017-12-11 11:51:25 -06:00
parent 80835e9f1a
commit e036bc58c2
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,8 @@ lxc_cache_map:
echo "nameserver {{ resolver }}" >> /etc/resolv.conf
{% endfor %}
rpm --import /etc/pki/rpm-gpg/*
# The containers do not need the LXC repository (only hosts need it).
rm -f /etc/yum.repos.d/thm-lxc2.0.repo
yum install -y {{ lxc_cache_distro_packages | join(' ') }}
rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python