From deb96d7b04414679c99873e34b327956f0989314 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 8 Dec 2016 15:16:10 -0500 Subject: [PATCH] ceph-common: fetch ceph_dev repo contents for CentOS from shaman Signed-off-by: Alfredo Deza --- .../tasks/installs/redhat_ceph_repository.yml | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml b/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml index 4523ca0a7..94a59604e 100644 --- a/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml @@ -5,12 +5,6 @@ state: present when: ceph_stable -- name: install the ceph development repository key - rpm_key: - key: "{{ ceph_dev_key }}" - state: present - when: ceph_dev - - name: add ceph stable repository package: name: http://download.ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm @@ -18,11 +12,21 @@ changed_when: false when: ceph_stable +# we must use curl instead of ansible's uri module because SNI support in +# Python is only available in 2.7.9 and later, and most supported distributions +# don't have that version, so a request to https fails. +- name: fetch ceph development repo file + command: 'curl -L https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo' + register: ceph_dev_yum_repo + when: ceph_dev + - name: add ceph development repository - package: - name: http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm - state: present - changed_when: false + copy: + content: "{{ ceph_dev_yum_repo.stdout }}" + dest: /etc/yum.repos.d/ceph-dev.repo + owner: root + group: root + backup: yes when: ceph_dev - name: add custom repo