From e916c744d54c0a6c49e22f9dbc9c487bdaceb68c Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 18 Jun 2018 22:34:22 -0400 Subject: [PATCH] redhat: Add the EPEL repository for moreutils packages The moreutils 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. Finally, we include the nodepool playbook from the tests repository in order to populate the necessary CI facts. Also, we don't need the LXC development headers so drop them. Change-Id: I287a7209d7840283e374a8bb14d9caa4f714baf0 --- tasks/repo_build_install.yml | 27 +++++++++++++++++++++++++++ vars/redhat.yml | 1 - vars/suse-42.yml | 1 - vars/ubuntu-16.04.yml | 1 - 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/tasks/repo_build_install.yml b/tasks/repo_build_install.yml index 7ebfdf7..f66c4b1 100644 --- a/tasks/repo_build_install.yml +++ b/tasks/repo_build_install.yml @@ -13,6 +13,33 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Install EPEL gpg keys + rpm_key: + key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7" + state: present + when: + - ansible_pkg_mgr in ['yum', 'dnf'] + register: _add_yum_keys + until: _add_yum_keys | success + retries: 5 + delay: 2 + +- name: Install the EPEL repository + yum_repository: + name: epel-repo_build + 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: 'moreutils perl-Time-Duration' + when: + - ansible_pkg_mgr in ['yum', 'dnf'] + register: install_epel_repo + until: install_epel_repo|success + retries: 5 + delay: 2 + - name: Install packages package: name: "{{ repo_build_distro_packages }}" diff --git a/vars/redhat.yml b/vars/redhat.yml index 604e8a3..3d455d8 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -24,7 +24,6 @@ repo_build_distro_packages: - librados2-devel # required to build cradox - libvirt-devel # required to build libvirt-python - libxslt-devel # required to build lxml - - lxc-devel # required to build lxc-python2 - MariaDB-devel # required to build MySQL-python - moreutils # provides `ts` command to timestamp pip logs - openldap-devel # required to build python-ldap diff --git a/vars/suse-42.yml b/vars/suse-42.yml index 69d5036..aca230e 100644 --- a/vars/suse-42.yml +++ b/vars/suse-42.yml @@ -26,7 +26,6 @@ repo_build_distro_packages: - libvirt-devel # required to build libvirt-python - libxslt1 - libxslt-devel # required to build lxml - - lxc-devel # required to build lxc-python2 - MariaDB-devel # required to build MySQL-python - moreutils # provides `ts` command to timestamp pip logs - cyrus-sasl-devel # required to build python-ldap diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 1a36e2e..52c721f 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -35,7 +35,6 @@ repo_build_distro_packages: - libvirt-dev # required to build libvirt-python - libxslt1-dev # required to build lxml - libxml2-dev # required to build lxml - - lxc-dev # required to build lxc-python2 - moreutils # provides `ts` command to timestamp pip logs - pkg-config - python-dev