bundles/postgresql: add bundle

This commit is contained in:
Franzi 2020-04-04 17:53:59 +02:00
parent 234604cd0c
commit 4da792f522
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -0,0 +1,15 @@
postgres_roles = {}
postgres_db = {}
for user, config in node.metadata['postgresql']['users'].items():
postgres_roles[user] = {
'password': config['password'],
}
for database, config in node.metadata['postgresql']['databases'].items():
postgres_db[database] = {
'owner': config['owner'],
'needs': {
'postgres_role:{}'.format(config['owner']),
},
}