diff --git a/roles/nfs/server/tasks/main.yml b/roles/nfs/server/tasks/main.yml index d9d92d2ec0..bb278e9bc5 100644 --- a/roles/nfs/server/tasks/main.yml +++ b/roles/nfs/server/tasks/main.yml @@ -15,11 +15,23 @@ tags: - nfs/server -- name: enable nfs-related services and run them +- name: enable nfs-related services and run them (fedora) action: service name={{ item }} enabled=true state=started with_items: - nfs-idmap - rpc-statd + when: ansible_distribution == 'Fedora' + tags: + - nfs/server + +- name: enable nfs-related services and run them (rhel) + action: service name={{ item }} enabled=true state=started + with_items: + - rpcidmapd + - rpcbind + - nfs + - nfslock + when: ansible_distribution == 'RedHat' tags: - nfs/server