From 1d7fe1e10c533d814eac76e96827dac077af2c43 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 11 Jun 2018 14:37:20 -0400 Subject: [PATCH] redhat: Add the EPEL repository for aria2 and python2-lxc packages The ARIA2 package is needed from EPEL so we install it inside the role. Moreover, in order to minimize the potential EPEL vs RDO package conflicts, we only allow a small subset of packages from the EPEL repository. This also removes the 'debootstrap' package from CentOS since it's not needed. Finally, we include the nodepool playbook from the tests repository in order to populate the necessary CI facts. Depends-On: https://review.openstack.org/#/c/574801/ Depends-On: https://review.openstack.org/#/c/575059/ Change-Id: Icd4d09a26cd95ecfefec26142723ddffe81aae74 Co-Authored-By: Markos Chandras --- tasks/lxc_install_yum.yml | 23 +++++++++++++++++++++++ tests/test.yml | 7 +------ vars/redhat-7-host.yml | 1 - 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/tasks/lxc_install_yum.yml b/tasks/lxc_install_yum.yml index f214614d..9cfa55aa 100644 --- a/tasks/lxc_install_yum.yml +++ b/tasks/lxc_install_yum.yml @@ -75,6 +75,29 @@ - "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" + state: present + register: _add_yum_keys + until: _add_yum_keys | success + retries: 5 + delay: 2 + +- name: Install the EPEL repository + yum_repository: + name: epel-lxc_hosts + baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}" + description: 'Extra Packages for Enterprise Linux 7 - $basearch' + gpgcheck: yes + enabled: yes + state: present + includepkgs: 'aria2 python2-lxc' + register: install_epel_repo + until: install_epel_repo|success + retries: 5 + delay: 2 + - name: Install distro packages package: pkg: "{{ lxc_hosts_distro_packages }}" diff --git a/tests/test.yml b/tests/test.yml index 5ea27058..3b3872e3 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -44,12 +44,7 @@ set_fact: lxc_container_ssh_key: "{{ _root_ssh_key['content'] | b64decode }}" - # This is a temporary hack to override the LXC image source to - # the reverse proxy if the test is run in OpenStack-Infra. - - name: Check if this is an OpenStack-CI nodepool instance - stat: - path: /etc/nodepool/provider - register: nodepool + - include_tasks: "common/common-tasks/test-set-nodepool-vars.yml" roles: - role: "lxc_hosts" diff --git a/vars/redhat-7-host.yml b/vars/redhat-7-host.yml index 01dfc1b0..20f67cb8 100644 --- a/vars/redhat-7-host.yml +++ b/vars/redhat-7-host.yml @@ -22,7 +22,6 @@ lxc_hosts_distro_packages: - bridge-utils - btrfs-progs - dbus - - debootstrap - dnsmasq - git - libseccomp