]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
nfs: stop nfs server service
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 7 Oct 2019 08:21:51 +0000 (10:21 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 7 Oct 2019 16:17:49 +0000 (18:17 +0200)
The syntax here wasn't working, this refact fixes this task.
Also, removing the `ignore_errors: true` which was hidding the failure.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1508506
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 47034effe0bb7de14442b0ba884ff4abe793b4b7)

roles/ceph-nfs/tasks/pre_requisite_non_container.yml

index f16f53e454fbd306ca8f12d050a7df5656c3857d..0af7e9bf23904df32cb8d51077cb7098ecac7e71 100644 (file)
@@ -95,7 +95,7 @@
 
 - name: stop nfs server service
   systemd:
-    name: "{%- if ansible_os_family == 'RedHat' 'nfs-server' %}{%- endif %}{%- if ansible_os_family == 'Suse' 'nfsserver' %}{%- endif %}{%- if ansible_os_family == 'Debian' 'nfs-kernel-server' %}{%- endif %}"
+    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
-  ignore_errors: true
+  failed_when: false