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
|
- name: Create config directory
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.file:
|
||||||
path: /etc/nfs.conf
|
path: /etc/nfs.conf.d
|
||||||
line: "{{ item }}=n"
|
state: directory
|
||||||
regexp: '^(#\s*)?{{ item }}=.*'
|
mode: "0755"
|
||||||
with_items:
|
owner: root
|
||||||
- vers2
|
group: "{{ ansible_wheel }}"
|
||||||
- vers3
|
|
||||||
notify: Restart nfs-server
|
|
||||||
|
|
||||||
- name: Disable NFS over UDP
|
- name: Create local config
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.copy:
|
||||||
path: /etc/nfs.conf
|
dest: /etc/nfs.conf.d/local.conf
|
||||||
line: "udp=n"
|
src: local.conf
|
||||||
regexp: '^(#\s*)?udp=.*'
|
mode: "0644"
|
||||||
insertbefore: vers2=n
|
owner: root
|
||||||
notify: Restart nfs-server
|
group: "{{ ansible_wheel }}"
|
||||||
|
|
||||||
- name: Install home/role autocreate scripts
|
- name: Install home/role autocreate scripts
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue