2015-08-31 21:23:29 +08:00
|
|
|
---
|
|
|
|
- name: install the ceph stable repository key
|
2015-09-04 00:18:53 +08:00
|
|
|
rpm_key:
|
|
|
|
key: "{{ ceph_stable_key }}"
|
|
|
|
state: present
|
2015-08-31 21:23:29 +08:00
|
|
|
when: ceph_stable
|
|
|
|
|
|
|
|
- name: install the ceph development repository key
|
2015-09-04 00:18:53 +08:00
|
|
|
rpm_key:
|
|
|
|
key: "{{ ceph_dev_key }}"
|
|
|
|
state: present
|
2015-08-31 21:23:29 +08:00
|
|
|
when: ceph_dev
|
|
|
|
|
|
|
|
- name: add ceph stable repository
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
2016-05-01 22:22:43 +08:00
|
|
|
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
|
2015-08-31 21:23:29 +08:00
|
|
|
changed_when: false
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_stable
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-01-29 02:11:22 +08:00
|
|
|
|
|
|
|
- name: add ceph stable repository
|
|
|
|
dnf:
|
2016-05-01 22:22:43 +08:00
|
|
|
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
|
2016-01-29 02:11:22 +08:00
|
|
|
changed_when: false
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_stable
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2015-08-31 21:23:29 +08:00
|
|
|
|
|
|
|
- name: add ceph development repository
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
|
|
|
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
|
2015-08-31 21:23:29 +08:00
|
|
|
changed_when: false
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_dev
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-01-29 02:11:22 +08:00
|
|
|
|
|
|
|
- name: add ceph development repository
|
|
|
|
dnf:
|
|
|
|
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
|
|
|
|
changed_when: false
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_dev
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2015-08-31 21:23:29 +08:00
|
|
|
|
2016-06-22 22:13:55 +08:00
|
|
|
- name: add custom repo
|
|
|
|
get_url:
|
|
|
|
url: "{{ ceph_custom_repo }}"
|
|
|
|
dest: /etc/yum.repos.d
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
when: ceph_custom
|
2016-08-04 13:26:59 +08:00
|
|
|
|
|
|
|
# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version
|
|
|
|
- name: purge yum cache
|
|
|
|
command: yum clean all
|
|
|
|
when:
|
|
|
|
ansible_pkg_mgr == 'yum'
|