Issue #1: Make role work on Ubuntu/Debian.

This commit is contained in:
Jeff Geerling 2014-11-12 14:18:52 -06:00
parent 619a751fb3
commit b71bb51c8d
4 changed files with 31 additions and 10 deletions

View file

@ -3,14 +3,19 @@ dependencies: []
galaxy_info:
author: geerlingguy
description: NFS installation for RHEL/CentOS.
description: NFS installation for Linux.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.4
platforms:
- name: EL
versions:
- 6
- 7
- all
- name: Debian
versions:
- all
- name: Ubuntu
versions:
- all
categories:
- system

View file

@ -1,9 +1,7 @@
---
- name: Ensure NFS utilities are installed.
yum: name=nfs-utils state=installed
# Setup/install tasks.
- include: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- name: Ensure rpcbind and nfs are running.
service: name={{ item }} state=started enabled=yes
with_items:
- rpcbind
- nfs
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'

9
tasks/setup-Debian.yml Normal file
View file

@ -0,0 +1,9 @@
---
- name: Ensure NFS utilities are installed.
apt: "name={{ item }} state=installed"
with_items:
- nfs-common
- nfs-kernel-server
- name: Ensure NFS is running.
service: name=nfs-kernel-server state=started enabled=yes

9
tasks/setup-RedHat.yml Normal file
View file

@ -0,0 +1,9 @@
---
- name: Ensure NFS utilities are installed.
yum: name=nfs-utils state=installed
- name: Ensure rpcbind and nfs are running.
service: "name={{ item }} state=started enabled=yes"
with_items:
- rpcbind
- nfs