]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
nfs: stop nfs server service in all context
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 7 Oct 2019 08:34:07 +0000 (10:34 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 7 Oct 2019 14:24:33 +0000 (10:24 -0400)
This commit moves this task in order to stop the nfs server service
regardless the deployment type desired (containerized or non
containerized).

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1508506
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-nfs/tasks/main.yml
roles/ceph-nfs/tasks/pre_requisite_non_container.yml

index 273889361603b30bd148890414e21d17ba5212af..f67703293d4747a37f7f4386b692b507235c7791 100644 (file)
@@ -4,6 +4,14 @@
     container_exec_cmd: "{{ container_binary }} exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
   when: containerized_deployment | bool
 
+# global/common requirement
+- name: stop nfs server service
+  systemd:
+    name: "{{ 'nfs-server' if ansible_os_family == 'RedHat' else 'nfsserver' if ansible_os_family == 'Suse' else 'nfs-kernel-server' if ansible_os_family == 'Debian' }}"
+    state: stopped
+    enabled: no
+  failed_when: false
+
 - name: include pre_requisite_non_container.yml
   include_tasks: pre_requisite_non_container.yml
   when: not containerized_deployment | bool
index 799bf944edf2255ca49b37d64cce41a41db5d50f..4250537e9781a74342d82f91943f1ed6443b2b15 100644 (file)
     owner: "root"
     group: "root"
     mode: "0755"
-
-- name: stop nfs server service
-  systemd:
-    name: "{{ 'nfs-server' if ansible_os_family == 'RedHat' else 'nfsserver' if ansible_os_family == 'Suse' else 'nfs-kernel-server' if ansible_os_family == 'Debian' }}"
-    state: stopped
-    enabled: no
-  failed_when: false