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: Create package directory
+ file: >
+ path=/tmp/ice_repo
+ state=directory
+ owner=root
+ group=root
+ mode=0644
+ when: ceph_stable_ice
+
+- name: Get ICE packages
+ get_url: >
+ url_username={{ ceph_stable_ice_user }}
+ url_password={{ ceph_stable_ice_password }}
+ url=https://download.inktank.com/enterprise/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+ dest=/tmp/ice_repo/ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+ when: ceph_stable_ice
+
+- name: Stat extracted repo files
+ stat: >
+ path=/tmp/ice_repo/repodata/repomd.xml
+ register: repo_exist
+
+- name: Extract packages
+ shell: cd /tmp/ice_repo && tar -xzf ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+ when: ceph_stable_ice and repo_exist.stat.exists == False
+
+- name: Move the extracted packages
+ shell: mv /tmp/ice_repo/ceph/*/* /tmp/ice_repo
+ when: ceph_stable_ice and repo_exist.stat.exists == False
+
+- name: Create repository
+ template: >
+ src=ice.repo.j2
+ dest=/etc/yum.repos.d/ice.repo
+ owner=root
+ group=root
+ mode=0644
+ when: ceph_stable_ice
+
- name: Install Ceph
yum: >
name=ceph
state=latest
-
fail: "msg=Distribution not supported {{ ansible_os_family }}"
when: "ansible_os_family not in ['Debian', 'RedHat']"
+- name: Fail on wrong distribution with wrong repo
+ fail: "msg=Inktank Ceph Enterprise can not be installed on {{ ansible_os_family }}, Red Hat Enterprise Linux 7 only"
+ when: ansible_os_family == 'Debian' and ceph_stable_ice
+
+- name: Fail on wrong distribution with wrong repo
+ fail: "msg=Inktank Ceph Enterprise can not be installed on {{ ansible_os_family }}i {{ ansible_distribution_major_version }}, Red Hat Enterprise Linux 7 only"
+ when: ansible_os_family == 'RedHat' and ansible_distribution_major_version != '7' and ceph_stable_ice
+
- include: install_on_redhat.yml
when: ansible_os_family == 'RedHat'
--- /dev/null
+# {{ ansible_managed }}
+[ice]
+name=Inktank Ceph Enterprise - local packages for Ceph
+baseurl=file:///tmp/ice_repo
+enabled=1
+gpgcheck=0
+protect=1
+priority=1
---\r
# You can override vars by using host or group vars\r
\r
-## Setup options\r
-#\r
+#########\r
+# INSTALL\r
+#########\r
\r
-# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT\r
-fsid: "{{ cluster_uuid.stdout }}"\r
+# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
\r
-## Packages branch\r
+# STABLE\r
+########\r
+\r
+# COMMUNITY VERSION\r
ceph_stable: true # use ceph stable branch\r
ceph_stable_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc\r
ceph_stable_release: giant # ceph stable release\r
# # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11, centos7 (see http://ceph.com/rpm-firefly/)\r
ceph_stable_redhat_distro: el7\r
\r
+# ENTERPRISE VERSION\r
+ceph_stable_ice: false # use Inktank Ceph Enterprise\r
+#ceph_stable_ice_version:\r
+#ceph_stable_ice_user:\r
+#ceph_stable_ice_password:\r
+\r
+# DEV\r
+# ###\r
+\r
ceph_dev: false # use ceph development branch\r
ceph_dev_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc\r
ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack\r
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.\r
ceph_dev_redhat_distro: centos7\r
\r
+###############\r
+# CONFIGURATION\r
+###############\r
+\r
## Ceph options\r
#\r
+fsid: "{{ cluster_uuid.stdout }}"\r
cephx: true\r
cephx_require_signatures: true # Kernel RBD does NOT support signatures!\r
cephx_cluster_require_signatures: true\r