bundlewrap/bundles/wordpress/metadata.py
2024-02-04 10:50:49 +01:00

31 lines
664 B
Python

defaults = {}
@metadata_reactor.provides(
'wordpress',
)
def wordpress(metadata):
return {
'wordpress': {
site: {
'db_password': repo.vault.password_for(f"wordpress {site} db").value,
}
for site in metadata.get('wordpress', {})
},
}
@metadata_reactor.provides(
'mariadb',
)
def mariadb(metadata):
return {
'mariadb': {
'databases': {
site: {
'password': metadata.get(f'wordpress/{site}/db_password')
}
for site in metadata.get('wordpress', {})
},
},
}