From 964d5c2c930be5b48d131bf9a9c9837e0a00ffd9 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sat, 10 Jan 2015 21:29:51 +0000 Subject: [PATCH] Fix this for the various Fedora and rhel versions. --- roles/nfs/client/tasks/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/roles/nfs/client/tasks/main.yml b/roles/nfs/client/tasks/main.yml index c701fa9810..2c6f9a8588 100644 --- a/roles/nfs/client/tasks/main.yml +++ b/roles/nfs/client/tasks/main.yml @@ -25,13 +25,25 @@ - nfs-utils - rpcbind -- name: enable nfs-related services and run them (fedora) +- name: enable nfs-related services and run them (fedora21) service: name={{ item }} enabled=true state=started with_items: - rpc-statd - when: ansible_distribution == 'Fedora' or ansible_distribution_major_version == '7' + when: ansible_distribution == 'Fedora' and ansible_distribution_major_version == '21' -- name: enable nfs-related services and run them (rhel) +- name: enable nfs-related services and run them (fedora20) + service: name={{ item }} enabled=true state=started + with_items: + - nfs-lock + when: ansible_distribution == 'Fedora' and ansible_distribution_major_version == '20' + +- name: enable nfs-related services and run them (rhel7) + service: name={{ item }} enabled=true state=started + with_items: + - rpc-statd + when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7' + +- name: enable nfs-related services and run them (rhel6) action: service name={{ item }} enabled=true state=started with_items: - rpcidmapd