From 6413b9c251512f7e6dae556515f0c612a42d4e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 4 Sep 2014 12:18:17 +0200 Subject: [PATCH] Improve RedHat support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the rpm key and the repos integration. Signed-off-by: Sébastien Han --- roles/ceph-common/defaults/main.yml | 10 +++++++++- roles/ceph-common/tasks/RedHat.yml | 9 +++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 128379d96..91e67fa82 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -8,12 +8,20 @@ #fsid: ## Packages branch +ceph_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc ceph_stable: true # use ceph stable branch ceph_stable_release: firefly # ceph stable release -redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11 + +# This option is needed for _both_ stable and dev version, so please always fill the right version +# # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11, centos7 (see http://ceph.com/rpm-firefly/) +ceph_stable_redhat_distro: el7 ceph_dev: false # use ceph developement branch ceph_dev_branch: master # developement branch you would like to use e.g: master, wip-hack +# supported distros are centos6, centos7, fc17, fc18, fc19, fc20, fedora17, fedora18, +# fedora19, fedora20, opensuse12, sles0. (see http://gitbuilder.ceph.com/). +# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important. +ceph_dev_redhat_distro: centos7 ## Ceph options # diff --git a/roles/ceph-common/tasks/RedHat.yml b/roles/ceph-common/tasks/RedHat.yml index a9e0ede77..d782250ce 100644 --- a/roles/ceph-common/tasks/RedHat.yml +++ b/roles/ceph-common/tasks/RedHat.yml @@ -22,19 +22,19 @@ - hdparm - name: Install the Ceph stable repository key - rpm_key: key=cephstable.asc state=present + rpm_key: key={{ ceph_key }} state=present when: ceph_stable - name: Install the Ceph developement repository key - rpm_key: key=cephdev.asc state=present + rpm_key: key={{ ceph_key }} state=present when: ceph_dev - name: Add Ceph stable repository - command: rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ redhat_distro }}/noarch/ceph-release-1-0.el6.noarch.rpm creates=/etc/yum.repos.d/cephstable.repo + command: rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ redhat_distro }}/noarch/ceph-release-1-0.el6.noarch.rpm creates=/etc/yum.repos.d/ceph.repo when: ceph_stable - name: Add Ceph development repository - command: rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ansible_lsb.codename }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.el6.noarch.rpm {{ ansible_lsb.codename }} main creates=/etc/yum.repos.d/cephdev.repo + command: rpm -U 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 creates=/etc/yum.repos.d/ceph.repo when: ceph_dev - name: Install Ceph @@ -51,3 +51,4 @@ - name: Disable OSD directory parsing by updatedb command: updatedb -e /var/lib/ceph + ignore_errors: true