bundles/nfs-server: introduce
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
5b1b7241b7
commit
2274e7aa37
4 changed files with 33 additions and 0 deletions
3
bundles/nfs-server/files/exports
Normal file
3
bundles/nfs-server/files/exports
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
% for path, shares in node.metadata['nfs-server']['shares'].items():
|
||||||
|
${path} ${' '.join(sorted(shares))}
|
||||||
|
% endfor
|
15
bundles/nfs-server/items.py
Normal file
15
bundles/nfs-server/items.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
files = {
|
||||||
|
'/etc/exports': {
|
||||||
|
'content_type': 'mako',
|
||||||
|
'triggers': {
|
||||||
|
'action:nfs_reload_shares',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
actions = {
|
||||||
|
'nfs_reload_shares': {
|
||||||
|
'command': 'exportfs -a',
|
||||||
|
'triggered': True,
|
||||||
|
},
|
||||||
|
}
|
7
bundles/nfs-server/metadata.py
Normal file
7
bundles/nfs-server/metadata.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
defaults = {
|
||||||
|
'apt': {
|
||||||
|
'packages': {
|
||||||
|
'nfs-kernel-server': {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
nodes['home.nas'] = {
|
nodes['home.nas'] = {
|
||||||
'hostname': '172.19.138.90',
|
'hostname': '172.19.138.90',
|
||||||
'bundles': {
|
'bundles': {
|
||||||
|
'nfs-server',
|
||||||
'zfs',
|
'zfs',
|
||||||
},
|
},
|
||||||
'groups': set(),
|
'groups': set(),
|
||||||
|
@ -21,6 +22,13 @@ nodes['home.nas'] = {
|
||||||
'gateway4': '172.19.138.1',
|
'gateway4': '172.19.138.1',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'nfs-server': {
|
||||||
|
'shares': {
|
||||||
|
'/storage/nas': {
|
||||||
|
'172.19.138.0/24(ro,all_squash,anonuid=65534,anongid=65534)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'systemd-networkd': {
|
'systemd-networkd': {
|
||||||
'bonds': {
|
'bonds': {
|
||||||
'bond0': {
|
'bond0': {
|
||||||
|
|
Loading…
Add table
Reference in a new issue