16 lines
410 B
Python
16 lines
410 B
Python
|
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']),
|
||
|
},
|
||
|
}
|