nfs_server: on rhel9, we don't need nfs-lock

Older rhel versions need to start this service, but rhel9 doesn't have
it as a seperate service.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2022-11-10 14:51:29 -08:00
parent 5ca4738e3b
commit f15eb8753a

View file

@ -28,11 +28,18 @@
with_items:
- rpcbind
- nfs-server
- nfs-lock
when: ansible_distribution == 'RedHat'
tags:
- nfs/server
- name: enable nfs-related services and run them (rhel) 7/8
service: name={{ item }} enabled=true state=started
with_items:
- nfs-lock
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int < 9
tags:
- nfs/server
- name: Kick exportfs if /etc/exports changed
command: /usr/sbin/exportfs -ra
when: exports.changed