From 52674aab6c9bead1e6ad8ae7bd58e106b312194b Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 2 Nov 2018 23:05:47 +0100 Subject: [PATCH] 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 --- tasks/lxc_install_yum.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/tasks/lxc_install_yum.yml b/tasks/lxc_install_yum.yml index 24ebd41c..43ded78c 100644 --- a/tasks/lxc_install_yum.yml +++ b/tasks/lxc_install_yum.yml @@ -13,36 +13,18 @@ # See the License for the specific language governing permissions and # 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 yum_repository: name: thm-lxc2.0 description: "COPR repository for LXC 2.0 packages on CentOS 7" baseurl: "{{ lxc_centos_package_baseurl }}" - enabled: no + enabled: yes gpgcheck: yes gpgkey: "{{ lxc_centos_package_key }}" repo_gpgcheck: no priority: 99 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 rpm_key: key: "{{ lxc_centos_package_key }}" @@ -52,14 +34,6 @@ retries: 5 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 rpm_key: key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"