mirror of https://github.com/ceph/ceph-ansible.git
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
---
|
|
- name: install the ceph stable repository key
|
|
rpm_key:
|
|
key: "{{ ceph_stable_key }}"
|
|
state: present
|
|
when: ceph_stable
|
|
|
|
- name: add ceph stable repository
|
|
yum_repository:
|
|
name: ceph_stable
|
|
description: Ceph Stable repo
|
|
gpgcheck: yes
|
|
state: present
|
|
gpgkey: "{{ ceph_stable_key }}"
|
|
baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch"
|
|
when: ceph_stable
|
|
|
|
- name: fetch ceph development repo file
|
|
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
|
|
register: ceph_dev_yum_repo
|
|
when: ceph_dev
|
|
|
|
- name: add ceph development repository
|
|
copy:
|
|
content: "{{ ceph_dev_yum_repo.content }}"
|
|
dest: /etc/yum.repos.d/ceph-dev.repo
|
|
owner: root
|
|
group: root
|
|
backup: yes
|
|
when: ceph_dev
|
|
|
|
- name: add custom repo
|
|
get_url:
|
|
url: "{{ ceph_custom_repo }}"
|
|
dest: /etc/yum.repos.d
|
|
owner: root
|
|
group: root
|
|
when: ceph_custom
|
|
|
|
# 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'
|