bundles/postgresql: rename users -> roles
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-10 12:37:58 +01:00
parent d087cea869
commit 3fbe32518a
Signed by: kunsi
GPG key ID: 12E3D2136B818350
19 changed files with 20 additions and 20 deletions

View file

@ -51,7 +51,7 @@ def import_database_settings_from_postfixadmin(metadata):
'dovecot': {
'admin_email': metadata.get('postfixadmin/admin_email'),
'database': {
'dbpass': metadata.get('postgresql/users/postfixadmin/password'),
'dbpass': metadata.get('postgresql/roles/postfixadmin/password'),
},
},
}

View file

@ -27,7 +27,7 @@ defaults = {
},
},
'postgresql': {
'users': {
'roles': {
'gitea': {
'password': repo.vault.password_for('{} postgresql gitea'.format(node.name)),
},

View file

@ -20,7 +20,7 @@ defaults = {
},
},
'postgresql': {
'users': {
'roles': {
'synapse_user': {
'password': repo.vault.password_for('{} postgresql synapse_user'.format(node.name)),
},

View file

@ -26,7 +26,7 @@ defaults = {
'sender_localpart': repo.vault.password_for('{} mautrix-telegram sender_localpart'.format(node.name)),
},
'postgresql': {
'users': {
'roles': {
'mautrix-telegram': {
'password': repo.vault.password_for('{} postgresql mautrix-telegram'.format(node.name)),
},

View file

@ -2,7 +2,7 @@ files = {
'/etc/miniflux.conf': {
'content_type': 'mako',
'context': {
'dbpassword': node.metadata['postgresql']['users']['miniflux']['password'],
'dbpassword': node.metadata['postgresql']['roles']['miniflux']['password'],
'base_url': node.metadata['miniflux']['domain'],
},
'triggers': {

View file

@ -21,7 +21,7 @@ defaults = {
},
},
'postgresql': {
'users': {
'roles': {
'miniflux': {
'password': repo.vault.password_for('{} postgresql miniflux'.format(node.name)),
},

View file

@ -21,7 +21,7 @@ defaults = {
'sender_localpart': '_discordpuppet_bot',
},
'postgresql': {
'users': {
'roles': {
'mx-puppet-discord': {
'password': repo.vault.password_for('{} postgresql mx-puppet-discord'.format(node.name)),
},

View file

@ -1,5 +1,5 @@
user = postfixadmin
password = ${node.metadata['postgresql']['users']['postfixadmin']['password']}
password = ${node.metadata['postgresql']['roles']['postfixadmin']['password']}
hosts = localhost
dbname = postfixadmin
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = true

View file

@ -1,5 +1,5 @@
user = postfixadmin
password = ${node.metadata['postgresql']['users']['postfixadmin']['password']}
password = ${node.metadata['postgresql']['roles']['postfixadmin']['password']}
hosts = localhost
dbname = postfixadmin
query = SELECT goto FROM alias WHERE address='%s' AND active = true

View file

@ -1,5 +1,5 @@
user = postfixadmin
password = ${node.metadata['postgresql']['users']['postfixadmin']['password']}
password = ${node.metadata['postgresql']['roles']['postfixadmin']['password']}
hosts = localhost
dbname = postfixadmin
query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = false AND active = true

View file

@ -1,5 +1,5 @@
user = postfixadmin
password = ${node.metadata['postgresql']['users']['postfixadmin']['password']}
password = ${node.metadata['postgresql']['roles']['postfixadmin']['password']}
hosts = localhost
dbname = postfixadmin
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true

View file

@ -29,7 +29,7 @@ files = {
'context': {
'setup_password': node.metadata['postfixadmin']['setup_password'],
'admin_email': node.metadata['postfixadmin']['admin_email'],
'database_password': node.metadata['postgresql']['users']['postfixadmin']['password'],
'database_password': node.metadata['postgresql']['roles']['postfixadmin']['password'],
},
'needs': {
'git_deploy:/opt/postfixadmin',

View file

@ -13,7 +13,7 @@ defaults = {
'owner': 'postfixadmin',
},
},
'users': {
'roles': {
'postfixadmin': {
'password': repo.vault.password_for(node.name + ' postgresql postfixadmin'),
},

View file

@ -35,7 +35,7 @@ svc_systemd = {
postgres_dbs = {}
for user, config in node.metadata.get('postgresql', {}).get('users', {}).items():
for user, config in node.metadata.get('postgresql', {}).get('roles', {}).items():
postgres_roles[user] = {
'password': config['password'],
'needs': {

View file

@ -139,7 +139,7 @@ if node.metadata['powerdns'].get('features', {}).get('pgsql', False):
files['/etc/powerdns/pdns.d/pgsql.conf'] = {
'content_type': 'mako',
'context': {
'password': node.metadata['postgresql']['users']['powerdns']['password'],
'password': node.metadata['postgresql']['roles']['powerdns']['password'],
},
'needs': {
'pkg_apt:pdns-backend-pgsql',
@ -152,7 +152,7 @@ if node.metadata['powerdns'].get('features', {}).get('pgsql', False):
files['/etc/powerdns/schema.pgsql.sql'] = {}
actions['powerdns_load_pgsql_schema'] = {
'command': node.metadata['postgresql']['users']['powerdns']['password'].format_into('PGPASSWORD={} psql -h 127.0.0.1 -d powerdns -U powerdns -w < /etc/powerdns/schema.pgsql.sql'),
'command': node.metadata['postgresql']['roles']['powerdns']['password'].format_into('PGPASSWORD={} psql -h 127.0.0.1 -d powerdns -U powerdns -w < /etc/powerdns/schema.pgsql.sql'),
'unless': 'sudo -u postgres psql -d powerdns -c "\dt" | grep domains 2>&1 >/dev/null',
'needs': {
'bundle:postgresql',

View file

@ -13,7 +13,7 @@ defaults = {
'api_key': repo.vault.password_for('{} powerdns api'.format(node.name)),
},
'postgresql': {
'users': {
'roles': {
'powerdns': {
'password': repo.vault.password_for('{} postgresql powerdns'.format(node.name)),
},

View file

@ -5,7 +5,7 @@ PORT = 9191
OFFLINE_MODE = True
SQLA_DB_USER = 'powerdnsadmin'
SQLA_DB_PASSWORD = '${node.metadata['postgresql']['users']['powerdnsadmin']['password']}'
SQLA_DB_PASSWORD = '${node.metadata['postgresql']['roles']['powerdnsadmin']['password']}'
SQLA_DB_HOST = '127.0.0.1'
SQLA_DB_NAME = 'powerdnsadmin'
SQLALCHEMY_TRACK_MODIFICATIONS = True

View file

@ -20,7 +20,7 @@ defaults = {
},
},
'postgresql': {
'users': {
'roles': {
'powerdnsadmin': {
'password': repo.vault.password_for('{} postgresql powerdnsadmin'.format(node.name)),
},

View file

@ -17,7 +17,7 @@ defaults = {
'cookie_secret': repo.vault.password_for('{} travelynx cookie_secret'.format(node.name)),
},
'postgresql': {
'users': {
'roles': {
'travelynx': {
'password': repo.vault.password_for('{} postgresql travelynx'.format(node.name)),
},