nfs_server: Move configs to include file
This commit is contained in:
parent
1e2e45551e
commit
112ad23a66
2 changed files with 21 additions and 16 deletions
7
roles/nfs_server/files/local.conf
Normal file
7
roles/nfs_server/files/local.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
[mountd]
|
||||
debug="auth,general"
|
||||
|
||||
[nfsd]
|
||||
udp=n
|
||||
tcp=y
|
||||
vers3=n
|
|
@ -1,21 +1,19 @@
|
|||
---
|
||||
- name: Disable NFS versions 2 and 3
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/nfs.conf
|
||||
line: "{{ item }}=n"
|
||||
regexp: '^(#\s*)?{{ item }}=.*'
|
||||
with_items:
|
||||
- vers2
|
||||
- vers3
|
||||
notify: Restart nfs-server
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/nfs.conf.d
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Disable NFS over UDP
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/nfs.conf
|
||||
line: "udp=n"
|
||||
regexp: '^(#\s*)?udp=.*'
|
||||
insertbefore: vers2=n
|
||||
notify: Restart nfs-server
|
||||
- name: Create local config
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/nfs.conf.d/local.conf
|
||||
src: local.conf
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Install home/role autocreate scripts
|
||||
ansible.builtin.copy:
|
||||
|
|
Loading…
Add table
Reference in a new issue