remove sql file and dispatch it in risotto-*-sql packages

This commit is contained in:
2020-09-06 09:48:32 +02:00
parent 7becbca64e
commit 9540ff6c8f
2 changed files with 12 additions and 154 deletions

View File

@ -1,17 +1,23 @@
%from os import listdir
%set %%dbname = %%getVar('risotto_main_dbname')
---
dbuser: %%getVar('risotto_db_user')
dbuser_options:
- LOGIN
- LOGIN
privileges:
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
dbhost: %%getVar('risotto_db_address')
dbport: 5432
dbtype: postgres
dbname: %%dbname
template: 'template0'
sqlscripts: ['/usr/share/eole/db/eole-risotto/gen/create_tables.sql']
sqlscripts:
%for %%file in %%listdir('/usr/share/eole/db/eole-risotto/gen/')
%if %%file.endswith('.sql')
- /usr/share/eole/db/eole-risotto/gen/%%file
%end if
%end for
pwd_files:
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'RISOTTO_DB_PASSWORD='}
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'RISOTTO_DB_PASSWORD='}