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: add ceph stable repository
|
2017-02-18 04:27:15 +08:00
|
|
|
yum_repository:
|
|
|
|
name: ceph_stable
|
|
|
|
description: Ceph Stable repo
|
|
|
|
gpgcheck: yes
|
2016-11-28 22:16:56 +08:00
|
|
|
state: present
|
2017-02-18 04:27:15 +08:00
|
|
|
gpgkey: "{{ ceph_stable_key }}"
|
|
|
|
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch"
|
2016-11-28 22:16:56 +08:00
|
|
|
when: ceph_stable
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-12-09 04:16:10 +08:00
|
|
|
- name: fetch ceph development repo file
|
2017-03-17 06:16:30 +08:00
|
|
|
uri:
|
|
|
|
url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo
|
|
|
|
return_content: yes
|
2016-12-09 04:16:10 +08:00
|
|
|
register: ceph_dev_yum_repo
|
|
|
|
when: ceph_dev
|
|
|
|
|
2016-01-29 02:11:22 +08:00
|
|
|
- name: add ceph development repository
|
2016-12-09 04:16:10 +08:00
|
|
|
copy:
|
2017-03-17 06:16:30 +08:00
|
|
|
content: "{{ ceph_dev_yum_repo.content }}"
|
2016-12-09 04:16:10 +08:00
|
|
|
dest: /etc/yum.repos.d/ceph-dev.repo
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
backup: yes
|
2016-11-28 22:16:56 +08:00
|
|
|
when: ceph_dev
|
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'
|