nfs: stop nfs server service in all context

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>
(cherry picked from commit 6c6a512a72)
pull/4559/head
Guillaume Abrioux 2019-10-07 10:34:07 +02:00
parent 003017d568
commit b1fa3c881c
2 changed files with 8 additions and 7 deletions

View File

@ -8,6 +8,14 @@
- name: include common.yml
include_tasks: common.yml
# 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:

View File

@ -231,10 +231,3 @@
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