From b1d30491f1581503003646684137bf2c218660ba Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Wed, 9 Dec 2015 15:06:48 -0500 Subject: Remove yum / dnf duplication --- roles/kube_nfs_volumes/tasks/main.yml | 7 +------ roles/kube_nfs_volumes/tasks/nfs.yml | 9 ++------- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'roles/kube_nfs_volumes') diff --git a/roles/kube_nfs_volumes/tasks/main.yml b/roles/kube_nfs_volumes/tasks/main.yml index 3fcb9fd18..2cc35844c 100644 --- a/roles/kube_nfs_volumes/tasks/main.yml +++ b/roles/kube_nfs_volumes/tasks/main.yml @@ -1,11 +1,6 @@ --- - name: Install pyparted (RedHat/Fedora) - yum: name=pyparted,python-httplib2 state=present - when: ansible_pkg_mgr == "yum" - -- name: Install pyparted (RedHat/Fedora) - dnf: name=pyparted,python-httplib2 state=present - when: ansible_pkg_mgr == "dnf" + action: "{{ ansible_pkg_mgr }} name=pyparted,python-httplib2 state=present" - name: partition the drives partitionpool: disks={{ disks }} force={{ force }} sizes={{ sizes }} diff --git a/roles/kube_nfs_volumes/tasks/nfs.yml b/roles/kube_nfs_volumes/tasks/nfs.yml index a58a7b824..eaec28544 100644 --- a/roles/kube_nfs_volumes/tasks/nfs.yml +++ b/roles/kube_nfs_volumes/tasks/nfs.yml @@ -1,11 +1,6 @@ --- -- name: Install NFS server on Fedora/Red Hat - yum: name=nfs-utils state=present - when: ansible_pkg_mgr == "yum" - -- name: Install NFS server on Fedora/Red Hat - dnf: name=nfs-utils state=present - when: ansible_pkg_mgr == "dnf" +- name: Install NFS server + action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present" - name: Start rpcbind on Fedora/Red Hat service: name=rpcbind state=started enabled=yes -- cgit v1.2.3