[PATCH 1/2] Use the new pkg module, to avoid having 2 tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 roles/nfs/client/tasks/main.yml | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/roles/nfs/client/tasks/main.yml b/roles/nfs/client/tasks/main.yml
index 627fab2..58ee460 100644
--- a/roles/nfs/client/tasks/main.yml
+++ b/roles/nfs/client/tasks/main.yml
@@ -34,22 +34,14 @@
 # Install needed packages
 #
 - name: Install needed nfs packages
-  yum: pkg={{ item }} state=present
+  pkg:
+    name: "{{ item }}"
+    state: present
   with_items: 
   - nfs-utils
   - rpcbind
   tags:
   - nfs/client
-  when: ansible_distribution_major_version|int < 22
-#
-- name: Install needed nfs packages
-  dnf: pkg={{ item }} state=present
-  with_items: 
-  - nfs-utils
-  - rpcbind
-  tags:
-  - nfs/client
-  when: ansible_distribution_major_version|int > 21
 
 - name: enable nfs-related services and run them (fedora20 only)
   service: name={{ item }}  enabled=true state=started
-- 
1.8.3.1
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux