bundlewrap/bundles/postgresql/items.py
mwiegand 2ef06345eb wip
2021-06-13 15:40:33 +02:00

19 lines
497 B
Python

if node.has_bundle('zfs'):
pkg_apt[postgresql]\
.setdefault('needs', [])\
.append('zfs_dataset:tank/postgresql')
for user, config in node.metadata.get('postgresql/roles').items():
postgres_roles[user] = {
'password': config['password'],
'needs': {
'svc_systemd:postgresql',
},
}
for database, config in node.metadata.get('postgresql/databases').items():
postgres_dbs[database] = config
svc_systemd = {
'postgresql': {},
}