Add nfs server for k8s persistent volumes.
This commit is contained in:
parent
6c7265d1d3
commit
1d97921e7b
1
ansible/roles/mrmanager/files/lockd_rc.conf
Normal file
1
ansible/roles/mrmanager/files/lockd_rc.conf
Normal file
@ -0,0 +1 @@
|
||||
rpc_lockd_enable="YES"
|
1
ansible/roles/mrmanager/files/mountd_rc.conf
Normal file
1
ansible/roles/mrmanager/files/mountd_rc.conf
Normal file
@ -0,0 +1 @@
|
||||
mountd_enable="YES"
|
1
ansible/roles/mrmanager/files/nfsd_rc.conf
Normal file
1
ansible/roles/mrmanager/files/nfsd_rc.conf
Normal file
@ -0,0 +1 @@
|
||||
nfs_server_enable="YES"
|
1
ansible/roles/mrmanager/files/rpcbind_rc.conf
Normal file
1
ansible/roles/mrmanager/files/rpcbind_rc.conf
Normal file
@ -0,0 +1 @@
|
||||
rpcbind_enable="YES"
|
1
ansible/roles/mrmanager/files/statd_rc.conf
Normal file
1
ansible/roles/mrmanager/files/statd_rc.conf
Normal file
@ -0,0 +1 @@
|
||||
rpc_statd_enable="YES"
|
@ -7,3 +7,35 @@
|
||||
loop:
|
||||
- name: net.link.ether.inet.proxyall
|
||||
value: "1"
|
||||
|
||||
- name: Install service configuration
|
||||
copy:
|
||||
src: "files/{{ item }}_rc.conf"
|
||||
dest: "/etc/rc.conf.d/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- nfsd
|
||||
- mountd
|
||||
- lockd
|
||||
- statd
|
||||
- rpcbind
|
||||
|
||||
- name: Create zfs datasets
|
||||
zfs:
|
||||
name: zdata/k8spersistent
|
||||
state: present
|
||||
extra_zfs_properties:
|
||||
sharenfs: "-network 10.215.1.0/24,-alldirs,-mapall=nobody"
|
||||
mountpoint: /k8spersistent
|
||||
|
||||
- name: Update ownership
|
||||
file:
|
||||
name: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: nobody
|
||||
group: nobody
|
||||
loop:
|
||||
- /k8spersistent
|
||||
|
Loading…
x
Reference in New Issue
Block a user