2018-09-07 20:45:43 +08:00
|
|
|
---
|
|
|
|
- name: debian based systems - repo handling
|
2019-04-01 23:46:15 +08:00
|
|
|
when: ceph_origin == 'repository'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: stable repos specific tasks
|
2019-05-12 17:40:05 +08:00
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- nfs_ganesha_stable | bool
|
2019-03-28 16:13:30 +08:00
|
|
|
- ceph_repository == 'community'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: add nfs-ganesha stable repository
|
|
|
|
apt_repository:
|
2019-06-21 02:04:24 +08:00
|
|
|
repo: "deb {{ nfs_ganesha_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_distribution_release) }} main"
|
2018-09-07 20:45:43 +08:00
|
|
|
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
|
2020-06-18 20:39:26 +08:00
|
|
|
until: update_ganesha_apt_cache is success
|
|
|
|
when: add_ganesha_apt_repo is changed
|
2018-09-07 20:45:43 +08:00
|
|
|
|
|
|
|
- name: debian based systems - dev repos specific tasks
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- nfs_ganesha_dev | bool
|
2019-03-28 16:13:30 +08:00
|
|
|
- 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
|
2019-05-22 16:02:42 +08:00
|
|
|
when: nfs_obj_gw | bool
|
2018-11-08 17:26:58 +08:00
|
|
|
- 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
|
2019-05-22 16:02:42 +08:00
|
|
|
when: nfs_file_gw | bool
|
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
|
2019-05-22 16:02:42 +08:00
|
|
|
when: nfs_file_gw | bool
|
2018-09-07 20:45:43 +08:00
|
|
|
- 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
|
2019-05-22 16:02:42 +08:00
|
|
|
when: nfs_obj_gw | bool
|