bundles/backup-server: fix dependencies
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
e596b45344
commit
58d2576ec9
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,8 @@ repo.libs.tools.require_bundle(node, 'zfs')
|
||||||
|
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
|
dataset = node.metadata.get('backup-server/zfs-base')
|
||||||
|
|
||||||
for nodename, config in node.metadata.get('backup-server/clients', {}).items():
|
for nodename, config in node.metadata.get('backup-server/clients', {}).items():
|
||||||
with open(join(repo.path, 'data', 'backup', 'keys', f'{nodename}.pub'), 'r') as f:
|
with open(join(repo.path, 'data', 'backup', 'keys', f'{nodename}.pub'), 'r') as f:
|
||||||
pubkey = f.read().strip()
|
pubkey = f.read().strip()
|
||||||
|
@ -14,9 +16,15 @@ for nodename, config in node.metadata.get('backup-server/clients', {}).items():
|
||||||
'content': pubkey,
|
'content': pubkey,
|
||||||
'owner': config['user'],
|
'owner': config['user'],
|
||||||
'mode': '0400',
|
'mode': '0400',
|
||||||
|
'needs': {
|
||||||
|
f'zfs_dataset:{dataset}/{nodename}',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
directories[f'/srv/backups/{nodename}/backups'] = {
|
directories[f'/srv/backups/{nodename}/backups'] = {
|
||||||
'owner': config['user'],
|
'owner': config['user'],
|
||||||
'mode': '0700',
|
'mode': '0700',
|
||||||
|
'needs': {
|
||||||
|
f'zfs_dataset:{dataset}/{nodename}',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue