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:
|
2021-03-03 22:43:50 +08:00
|
|
|
repo: "deb {{ nfs_ganesha_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_facts['distribution_release']) }} main"
|
2018-09-07 20:45:43 +08:00
|
|
|
state: present
|
|
|
|
update_cache: no
|
|
|
|
register: add_ganesha_apt_repo
|
|
|
|
|
2022-01-19 17:19:37 +08:00
|
|
|
- name: add libntirpc stable repository
|
|
|
|
apt_repository:
|
|
|
|
repo: "deb {{ libntirpc_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_facts['distribution_release']) }} main"
|
|
|
|
state: present
|
|
|
|
update_cache: no
|
|
|
|
register: add_libntirpc_apt_repo
|
|
|
|
when: libntirpc_stable_deb_repo is defined
|
|
|
|
|
|
|
|
- name: add nfs-ganesha ppa apt key
|
|
|
|
apt_key:
|
|
|
|
keyserver: "{{ nfs_ganesha_apt_keyserver }}"
|
|
|
|
id: "{{ nfs_ganesha_apt_key_id }}"
|
|
|
|
when:
|
|
|
|
- nfs_ganesha_apt_key_id is defined
|
|
|
|
- nfs_ganesha_apt_keyserver is defined
|
|
|
|
|
2018-09-07 20:45:43 +08:00
|
|
|
- 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
|
2022-01-19 17:19:37 +08:00
|
|
|
when: add_ganesha_apt_repo is changed or add_libntirpc_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:
|
2021-04-29 15:01:13 +08:00
|
|
|
url: "https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_release'] }}/flavors/{{ nfs_ganesha_flavor }}/repo?arch={{ ansible_facts['architecture'] }}"
|
2018-09-07 20:45:43 +08:00
|
|
|
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 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
|