]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
nfs: move packages installation to own role 2014/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Oct 2017 15:10:39 +0000 (17:10 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Oct 2017 17:10:15 +0000 (19:10 +0200)
Make role `ceph-nfs` handling itself the installation of nfs
packages.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-common/tasks/installs/install_debian_packages.yml
roles/ceph-common/tasks/installs/install_debian_rhcs_packages.yml
roles/ceph-common/tasks/installs/install_redhat_packages.yml
roles/ceph-common/tasks/installs/redhat_community_repository.yml
roles/ceph-nfs/tasks/pre_requisite_non_container.yml

index 443da199e8066a162ec7007a52ef9021f8b724f0..46d65b665978714499be92cc119e4333b41beaa7 100644 (file)
     update_cache: yes
   when:
     - rgw_group_name in group_names
-
-- name: install jemalloc for debian
-  apt:
-    name: libjemalloc1
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    update_cache: yes
-  when:
-    - nfs_group_name in group_names
-
-- name: install nfs cephfs gateway
-  package:
-    name: nfs-ganesha-ceph
-  when:
-    - nfs_group_name in group_names
-    - nfs_file_gw
-
-- name: install nfs rgw gateway
-  package:
-    name: "{{ item }}"
-  with_items:
-    - nfs-ganesha-rgw
-    - radosgw
-  when:
-    - nfs_group_name in group_names
-    - nfs_obj_gw
index 753b87e0cfd22abba94b448e7322a276ed0d68a9..69bcf18eedb1ece49032051d0cd958ad60e7f47e 100644 (file)
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
   when:
     - client_group_name in group_names
-
-- name: install red hat storage nfs gateway for debian
-  apt:
-    name: nfs-ganesha
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - nfs_group_name in group_names
-
-- name: install red hat storage nfs file gateway
-  apt:
-    name: nfs-ganesha-ceph
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - nfs_group_name in group_names
-    - nfs_file_gw
-
-- name: install red hat storage nfs obj gateway
-  apt:
-    name: nfs-ganesha-rgw
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - nfs_group_name in group_names
-    - nfs_obj_gw
index 291d1cca46e9dcf517cc4aeefb91fc5f34a99b3c..c431a616fbb026eccde20ff20928acf4d687fb2c 100644 (file)
@@ -8,7 +8,7 @@
     - ansible_distribution == 'RedHat'
 
 - name: install centos dependencies
-  package:
+  yum:
     name: "{{ item }}"
     state: present
   with_items: "{{ centos_package_dependencies }}"
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
   when:
     - rgw_group_name in group_names
-
-- name: install redhat nfs-ganesha-ceph package
-  package:
-    name: nfs-ganesha-ceph
-  when:
-    - nfs_group_name in group_names
-    - nfs_file_gw
-
-- name: install nfs cephfs gateway
-  package:
-    name: nfs-ganesha-ceph
-  when:
-    - nfs_group_name in group_names
-    - nfs_file_gw
-
-- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
-  package:
-    name: "{{ item }}"
-  with_items:
-    - nfs-ganesha-rgw
-    - ceph-radosgw
-  when:
-    - nfs_group_name in group_names
-    - nfs_obj_gw
index 8d261e5dd4944f897ee89ba44dffa3ea7dd82214..5aff95e0be6723def750721e14d296d7606b0780 100644 (file)
@@ -20,8 +20,7 @@
     gpgcheck: yes
     state: present
     gpgkey: "{{ ceph_stable_key }}"
-    baseurl: "{{ ceph_mirror }}/nfs-ganesha/rpm-{{ nfs_ganesha_stable_branch }}/{{ ceph_stable_release }}/$basearch"
+    baseurl: "{{ ceph_mirror }}/nfs-ganesha/rpm-{{ nfs_ganesha_stable_branch }}/luminous/$basearch"
   when:
     - nfs_group_name in group_names
     - nfs_ganesha_stable
-
index 88e281be07e8deae32e181f377ca8a344c318616..822eff8aff39273cfaa29b751318cd37e9b790fc 100644 (file)
@@ -1,4 +1,87 @@
 ---
+- name: install redhat nfs-ganesha-ceph package
+  package:
+    name: nfs-ganesha-ceph
+  when:
+    - nfs_file_gw
+    - ansible_os_family == 'RedHat'
+
+- name: install nfs cephfs gateway
+  package:
+    name: nfs-ganesha-ceph
+  when:
+    - nfs_file_gw
+    - ansible_os_family == 'RedHat'
+
+- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
+  package:
+    name: "{{ item }}"
+  with_items:
+    - nfs-ganesha-rgw
+    - ceph-radosgw
+  when:
+    - nfs_obj_gw
+    - ansible_os_family == 'RedHat'
+
+- name: install jemalloc for debian
+  apt:
+    name: libjemalloc1
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    update_cache: yes
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - 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 == 'Debian'
+    - nfs_file_gw
+
+- name: install nfs rgw gateway
+  package:
+    name: "{{ item }}"
+  with_items:
+    - nfs-ganesha-rgw
+    - radosgw
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository != 'rhcs'
+    - ansible_os_family == 'Debian'
+    - nfs_obj_gw
+
+# debian_rhcs installation
+- name: install red hat storage nfs gateway for debian
+  apt:
+    name: nfs-ganesha
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository == 'rhcs'
+
+- name: install red hat storage nfs file gateway
+  apt:
+    name: nfs-ganesha-ceph
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository == 'rhcs'
+    - nfs_file_gw
+
+- name: install red hat storage nfs obj gateway
+  apt:
+    name: nfs-ganesha-rgw
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository == 'rhcs'
+    - nfs_obj_gw
+
 # NOTE (leseb): we use root:ceph for permissions since ganesha
 # does not have the right selinux context to read ceph directories.
 - name: create rados gateway and ganesha directories