nfs-server: Initial version of role
This commit is contained in:
parent
03cb591e21
commit
93b241e8ed
1 changed files with 20 additions and 0 deletions
20
roles/nfs-server/tasks/main.yml
Normal file
20
roles/nfs-server/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- name: install nfs packages
|
||||||
|
package:
|
||||||
|
name: nfs-utils
|
||||||
|
state: installed
|
||||||
|
|
||||||
|
- name: disable nfs versions 2 and 3
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/nfs.conf
|
||||||
|
line: "{{ item }}=n"
|
||||||
|
regexp: '^(#\s*)?{{ item }}=.*'
|
||||||
|
with_items:
|
||||||
|
- vers2
|
||||||
|
- vers3
|
||||||
|
|
||||||
|
- name: enable nfs server services
|
||||||
|
service:
|
||||||
|
name: nfs-server
|
||||||
|
state: started
|
||||||
|
enabled: true
|
Loading…
Add table
Add a link
Reference in a new issue