bundles/postgresql: add bundle
This commit is contained in:
parent
234604cd0c
commit
4da792f522
1 changed files with 15 additions and 0 deletions
15
bundles/postgresql/items.py
Normal file
15
bundles/postgresql/items.py
Normal 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']),
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in a new issue