ninebadge/tmpl/ninebadge-db.yml

40 lines
998 B
YAML
Raw Normal View History

2022-02-09 09:55:14 +01:00
---
%set dmode = %%getVar('nineskeletor_db_mode','non')
%if %%dmode == "externe"
dbhost: %%nineskeletor_dbserver
dbport: %%nineskeletor_dbport
dbroot: %%nineskeletor_dbuser
dbrootpwd: %%nineskeletor_dbpass
%else if %%dmode == "local"
dbhost: 127.0.0.1
%end if
dbtype: mysql
dbname: ninebadge
dbuser: ninebadge
dbpass: "changeme"
%set allow_hosts = %%getVar('nineskeletor_allow_hosts', '')
%if %%dmode == "local"
client_hosts: ["127.0.0.1", "localhost" %slurp
%else if %%dmode == "externe"
client_hosts: ["%%adresse_ip_eth0" %slurp
%end if
%if %%dmode != "default"
%if %%is_empty(%%allow_hosts)
]
%else
%for %%hst in %%allow_hosts
,"%%hst" %slurp
%end for
]
%end if
%end if
createscript: "/usr/share/eole/db/ninebadge/gen/ninebadge-create-0.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/var/www/html/ninebadge/.env.local',
pattern: 'DATABASE_PASSWORD=',
owner: 'root:www-data',
mod: '660' }