bundles/nfs-client: minor fixes
This commit is contained in:
parent
74b3a513f6
commit
a38b66a7c5
1 changed files with 10 additions and 7 deletions
|
@ -10,15 +10,11 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items():
|
||||||
unitname = data.get('mountpoint','')[1:].replace('-','\\x2d').replace('/','-')
|
unitname = data.get('mountpoint','')[1:].replace('-','\\x2d').replace('/','-')
|
||||||
|
|
||||||
directories[data['mountpoint']] = {
|
directories[data['mountpoint']] = {
|
||||||
'owner': None,
|
'owner': data.get('owner'),
|
||||||
'group': None,
|
'group': data.get('group'),
|
||||||
'mode': None,
|
'mode': data.get('mode'),
|
||||||
}
|
}
|
||||||
|
|
||||||
for parameter in ['mode', 'owner', 'group']:
|
|
||||||
if parameter in data:
|
|
||||||
directories[data['mountpoint']][parameter] = data[parameter]
|
|
||||||
|
|
||||||
if 'suid' not in data['mount_options']:
|
if 'suid' not in data['mount_options']:
|
||||||
data['mount_options'].add('nosuid')
|
data['mount_options'].add('nosuid')
|
||||||
|
|
||||||
|
@ -49,6 +45,13 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items():
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
files['/etc/systemd/system/{}.automount'.format(unitname)] = {
|
||||||
|
'delete': True,
|
||||||
|
'triggers': {
|
||||||
|
"action:systemd-reload",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
svc_systemd['{}.mount'.format(unitname)] = {
|
svc_systemd['{}.mount'.format(unitname)] = {
|
||||||
'needs': {
|
'needs': {
|
||||||
'file:/etc/systemd/system/{}.mount'.format(unitname),
|
'file:/etc/systemd/system/{}.mount'.format(unitname),
|
||||||
|
|
Loading…
Reference in a new issue