bundles/navidrome: make zfs pool configurable
This commit is contained in:
parent
7c9aec35fb
commit
48f69b1bc3
1 changed files with 23 additions and 14 deletions
|
@ -25,24 +25,33 @@ defaults = {
|
|||
},
|
||||
},
|
||||
},
|
||||
'zfs': {
|
||||
'datasets': {
|
||||
'tank/navidrome': {},
|
||||
'tank/navidrome/install': {
|
||||
'mountpoint': '/opt/navidrome',
|
||||
'needed_by': {
|
||||
'directory:/opt/navidrome',
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'zfs/datasets',
|
||||
)
|
||||
def zfs(metadata):
|
||||
zfs_base = metadata.get('navidrome/zfs_base', 'tank')
|
||||
return {
|
||||
'zfs': {
|
||||
'datasets': {
|
||||
f'{zfs_base}/navidrome': {},
|
||||
f'{zfs_base}/navidrome/install': {
|
||||
'mountpoint': '/opt/navidrome',
|
||||
'needed_by': {
|
||||
'directory:/opt/navidrome',
|
||||
},
|
||||
},
|
||||
},
|
||||
'tank/navidrome/home': {
|
||||
'mountpoint': '/var/opt/navidrome',
|
||||
'needed_by': {
|
||||
'directory:/var/opt/navidrome',
|
||||
f'{zfs_base}/navidrome/home': {
|
||||
'mountpoint': '/var/opt/navidrome',
|
||||
'needed_by': {
|
||||
'directory:/var/opt/navidrome',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue