Fix install of nfs-ganesha-ceph for Debian/SuSE

The Debian and SuSE installs for nfs-ganesha on the non-rhcs repository
requires you to allow_unauthenticated for Debian, and disable_gpg_check
for SuSE. The nfs-ganesha-rgw package already does this, but the
nfs-ganesha-ceph package will fail to install because of this same
issue.

This PR moves the installations to happen when the appropriate flags are
set to True (nfs_obj_gw & nfs_file_gw), but does it per distro (one for
SuSE and one for Debian) so that the appropriate flag can be passed to
ignore the GPG check.
pull/2567/head v3.1.0beta9
Andy McCrae 2018-03-22 12:19:22 +00:00 committed by Guillaume Abrioux
parent 75733daf23
commit e99351b95b
1 changed files with 12 additions and 20 deletions

View File

@ -114,41 +114,33 @@
- ceph_repository != 'rhcs'
- ansible_os_family == 'Debian'
# debian installation
- name: install nfs cephfs gateway
package:
name: nfs-ganesha-ceph
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
- ceph_repository != 'rhcs'
- ansible_os_family in ['Debian', 'Suse']
- nfs_file_gw
- name: install nfs rgw gateway - suse
- name: install nfs rgw/cephfs gateway - suse
zypper:
name: "{{ item }}"
name: "{{ item.name }}"
disable_gpg_check: yes
with_items:
- nfs-ganesha-rgw
- radosgw
- { name: 'nfs-ganesha-rgw', install: "{{ nfs_obj_gw }}" }
- { name: 'radosgw', install: "{{ nfs_obj_gw }}" }
- { name: 'nfs-ganesha-ceph', install: "{{ nfs_file_gw }}" }
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
- ceph_repository != 'rhcs'
- ansible_os_family == 'Suse'
- nfs_obj_gw
- item.install | bool
- name: install nfs rgw gateway - debian
- name: install nfs rgw/cephfs gateway - debian
apt:
name: "{{ item }}"
name: "{{ item.name }}"
allow_unauthenticated: yes
with_items:
- nfs-ganesha-rgw
- radosgw
- { name: 'nfs-ganesha-rgw', install: "{{ nfs_obj_gw }}" }
- { name: 'radosgw', install: "{{ nfs_obj_gw }}" }
- { name: 'nfs-ganesha-ceph', install: "{{ nfs_file_gw }}" }
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
- ceph_repository != 'rhcs'
- ansible_os_family == 'Debian'
- nfs_obj_gw
- item.install | bool
# debian_rhcs installation
- name: install red hat storage nfs gateway for debian