]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: fetch ceph_dev repo contents for CentOS from shaman 1169/head
authorAlfredo Deza <adeza@redhat.com>
Thu, 8 Dec 2016 20:16:10 +0000 (15:16 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 8 Dec 2016 21:55:15 +0000 (16:55 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
roles/ceph-common/tasks/installs/redhat_ceph_repository.yml

index 4523ca0a732a3904f70fa1bb151806d74c8ada69..94a59604e536d4c9e7a19f2a4deb48ba3213b3ef 100644 (file)
@@ -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
   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