ceph-ansible/roles/ceph-common/tasks/installs/debian_ceph_repository.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

---
- name: install the ceph repository stable key
2015-09-04 00:18:53 +08:00
apt_key:
data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}"
2015-09-04 00:18:53 +08:00
state: present
when: ceph_stable
- name: install the ceph development repository key
2015-09-04 00:18:53 +08:00
apt_key:
data: "{{ lookup('file', role_path+'/files/cephdev.asc') }}"
2015-09-04 00:18:53 +08:00
state: present
when: ceph_dev
- name: add ceph stable repository
2015-09-04 00:18:53 +08:00
apt_repository:
repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
2015-09-04 00:18:53 +08:00
state: present
changed_when: false
when: ceph_stable
# we must use curl instead of ansible's uri module because SNI support in
# Python is only available in 2.7.9 and later, and most supported distributions
# don't have that version, so a request to https fails.
- name : fetch ceph development repository sources list file
command: "curl -L https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_lsb.codename }}/repo"
register: ceph_dev_deb_repo
when: ceph_dev
- name: add ceph development repository
2015-09-04 00:18:53 +08:00
apt_repository:
repo: "{{ ceph_dev_deb_repo.stdout }}"
2015-09-04 00:18:53 +08:00
state: present
changed_when: false
when: ceph_dev
- name: add ubuntu cloud archive key package
package:
name: ubuntu-cloud-keyring
when: ceph_stable_uca
- name: add ubuntu cloud archive repository
apt_repository:
repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca}} main"
state: present
changed_when: false
when: ceph_stable_uca
- name: add custom repo
apt_repository:
repo: "deb {{ ceph_custom_repo }} {{ ansible_lsb.codename }} main"
state: present
changed_when: false
when: ceph_custom
- name: add gluster nfs ganesha repo
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- ppa:gluster/libntirpc
- ppa:gluster/nfs-ganesha
changed_when: false
when:
- (nfs_obj_gw or nfs_file_gw)
- not ansible_distribution == "Debian"