2018-09-07 20:45:43 +08:00
|
|
|
---
|
|
|
|
- name: debian based systems - repo handling
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- ceph_origin == 'repository'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: stable repos specific tasks
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- nfs_ganesha_stable
|
|
|
|
- ceph_repository == 'community'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: add nfs-ganesha stable repository
|
|
|
|
apt_repository:
|
|
|
|
repo: "deb {{ nfs_ganesha_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
|
|
|
|
state: present
|
|
|
|
update_cache: no
|
|
|
|
register: add_ganesha_apt_repo
|
|
|
|
|
|
|
|
- name: update apt cache
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
register: update_ganesha_apt_cache
|
|
|
|
retries: 5
|
|
|
|
delay: 2
|
|
|
|
until: update_ganesha_apt_cache | success
|
|
|
|
when:
|
|
|
|
- add_ganesha_apt_repo | changed
|
|
|
|
|
|
|
|
- name: debian based systems - dev repos specific tasks
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- nfs_ganesha_dev
|
|
|
|
- ceph_repository == 'dev'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: fetch nfs-ganesha development repository
|
|
|
|
uri:
|
|
|
|
url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}/flavors/{{ nfs_ganesha_flavor }}/repo
|
|
|
|
return_content: yes
|
2019-01-03 23:08:58 +08:00
|
|
|
register: nfs_ganesha_dev_apt_repo
|
2018-09-07 20:45:43 +08:00
|
|
|
|
|
|
|
- name: add nfs-ganesha development repository
|
|
|
|
copy:
|
|
|
|
content: "{{ nfs_ganesha_dev_apt_repo.content }}"
|
|
|
|
dest: /etc/apt/sources.list.d/nfs-ganesha-dev.list
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
backup: yes
|
|
|
|
|
|
|
|
- name: debain based systems - install required packages
|
|
|
|
block:
|
|
|
|
- name: debian based systems- non-rhcs installation
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- (ceph_origin == 'repository' or ceph_origin == 'distro')
|
|
|
|
- ceph_repository != 'rhcs'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: install jemalloc for debian
|
|
|
|
apt:
|
|
|
|
name: libjemalloc1
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
update_cache: yes
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: install nfs rgw/cephfs gateway - debian
|
|
|
|
apt:
|
2018-11-08 17:26:58 +08:00
|
|
|
name: ['nfs-ganesha-rgw', 'radosgw']
|
2018-09-07 20:45:43 +08:00
|
|
|
allow_unauthenticated: yes
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-11-08 17:26:58 +08:00
|
|
|
when: nfs_obj_gw
|
|
|
|
- name: install nfs rgw/cephfs gateway - debian
|
|
|
|
apt:
|
|
|
|
name: nfs-ganesha-ceph
|
|
|
|
allow_unauthenticated: yes
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-11-08 17:26:58 +08:00
|
|
|
when: nfs_file_gw
|
2018-09-07 20:45:43 +08:00
|
|
|
|
|
|
|
- name: debian based systems - rhcs installation
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- (ceph_origin == 'repository' or ceph_origin == 'distro')
|
|
|
|
- ceph_repository == 'rhcs'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: install red hat storage nfs gateway for debian
|
|
|
|
apt:
|
|
|
|
name: nfs-ganesha
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: install red hat storage nfs file gateway
|
|
|
|
apt:
|
|
|
|
name: nfs-ganesha-ceph
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
when:
|
|
|
|
- nfs_file_gw
|
|
|
|
- name: install red hat storage nfs obj gateway
|
|
|
|
apt:
|
|
|
|
name: nfs-ganesha-rgw
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2018-12-19 21:55:01 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2018-09-07 20:45:43 +08:00
|
|
|
when:
|
|
|
|
- nfs_obj_gw
|