From 003017d56801553fc5e3d73c380f0be978514059 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 7 Oct 2019 10:21:51 +0200 Subject: [PATCH] nfs: stop nfs server service 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 (cherry picked from commit 47034effe0bb7de14442b0ba884ff4abe793b4b7) --- roles/ceph-nfs/tasks/pre_requisite_non_container.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml index 5031f0036..bfe71448c 100644 --- a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml +++ b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml @@ -234,7 +234,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