lxc: stop mirroring COPR locally on CentOS 7

We no longer need to mirror this locally all the time on all the
machines which includes downloading way too many packages than we
need.

We have mirorring and proxies in place in upstream to avoid these
issues and if we have any problems, we can resort to adding mirrors
or proxies in infra.

If there is network problems with these repositories, they will still
hit us if we're mirroring things.

Change-Id: Idad048de6aef569e0e3b73b09448750cf0a06b16
This commit is contained in:
Mohammed Naser 2018-11-02 23:05:47 +01:00
parent f48ba8bc4a
commit 52674aab6c

View File

@ -13,36 +13,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Ensure createrepo package is installed
yum:
name: createrepo
state: latest
- name: Deploy upstream COPR yum repo for LXC 2.0 - name: Deploy upstream COPR yum repo for LXC 2.0
yum_repository: yum_repository:
name: thm-lxc2.0 name: thm-lxc2.0
description: "COPR repository for LXC 2.0 packages on CentOS 7" description: "COPR repository for LXC 2.0 packages on CentOS 7"
baseurl: "{{ lxc_centos_package_baseurl }}" baseurl: "{{ lxc_centos_package_baseurl }}"
enabled: no enabled: yes
gpgcheck: yes gpgcheck: yes
gpgkey: "{{ lxc_centos_package_key }}" gpgkey: "{{ lxc_centos_package_key }}"
repo_gpgcheck: no repo_gpgcheck: no
priority: 99 priority: 99
state: present state: present
- name: Deploy local COPR yum repo for LXC 2.0
yum_repository:
name: thm-lxc2.0-local
description: "Local repository for LXC 2.0 packages on CentOS 7"
baseurl: "file:///opt/thm-lxc2.0"
enabled: no
gpgcheck: yes
gpgkey: "{{ lxc_centos_package_key }}"
repo_gpgcheck: no
priority: 99
state: present
register: copr_repository_deploy
- name: Add GPG key for COPR LXC repo - name: Add GPG key for COPR LXC repo
rpm_key: rpm_key:
key: "{{ lxc_centos_package_key }}" key: "{{ lxc_centos_package_key }}"
@ -52,14 +34,6 @@
retries: 5 retries: 5
delay: 2 delay: 2
- name: Create and enable local LXC package repository
command: "{{ item }}"
with_items:
- "reposync --repoid=thm-lxc2.0 --download_path=/tmp/"
- "createrepo /tmp/thm-lxc2.0"
- "rsync -a --delete /tmp/thm-lxc2.0/ /opt/thm-lxc2.0/"
- "yum-config-manager --enable thm-lxc2.0-local"
- name: Install EPEL gpg keys - name: Install EPEL gpg keys
rpm_key: rpm_key:
key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7" key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"