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 <gabrioux@redhat.com>
(cherry picked from commit 47034effe0)
pull/4563/head
Guillaume Abrioux 2019-10-07 10:21:51 +02:00
parent d617626ef4
commit 9a62d006bd
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@
- name: stop nfs server service - name: stop nfs server service
systemd: 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 state: stopped
enabled: no enabled: no
ignore_errors: true failed_when: false