]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-defaults: Enable local epel repository
authorErwan Velu <erwan@redhat.com>
Fri, 1 Jun 2018 16:53:10 +0000 (18:53 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 4 Jun 2018 06:11:35 +0000 (08:11 +0200)
During the tests, the remote epel repository is generating a lots of
errors leading to broken jobs (issue #2666)

This patch is about using a local repository instead of a random one.
To achieve that, we make a preliminary install of epel-release, remove
the metalink and enforce a baseurl to our local http mirror.

That should speed up the build process but also avoid the random errors
we face.

This patch is part of a patch series that tries to remove all possible yum failures.

Signed-off-by: Erwan Velu <erwan@redhat.com>
tests/functional/setup.yml

index 0b684f02cdff33ecfb1ad8fe9c977115969ac190..0b8f78ffe84cb54200d31e9495d964a5bf341bce 100644 (file)
         value: 0
       when: ansible_distribution == 'CentOS'
 
+    - name: install epel
+      package:
+        name: epel-release
+        state: present
+      when:
+        - ansible_distribution == 'CentOS'
+        - not is_atomic
+
+    - name: enable local epel repository
+      ini_file:
+        path: /etc/yum.repos.d/epel.repo
+        section: epel
+        option: baseurl
+        value: http://apt-mirror.front.sepia.ceph.com/epel7/
+      when:
+        - ansible_distribution == 'CentOS'
+        - not is_atomic
+
+    - name: disable remote epel repository
+      ini_file:
+        path: /etc/yum.repos.d/epel.repo
+        section: epel
+        option: metalink
+        state: absent
+      when:
+        - ansible_distribution == 'CentOS'
+        - not is_atomic
+
     - name: resize logical volume for root partition to fill remaining free space
       command: lvresize -l +100%FREE /dev/atomicos/root
       when: is_atomic