ninestat/tmpl/ninestat-db.yml

41 lines
1014 B
YAML
Raw Normal View History

2019-11-29 09:53:20 +01:00
---
%set dmode = %%getVar('ninestat_db_mode','non')
%if %%dmode == "externe"
dbhost: %%ninestat_dbserver
dbport: %%ninestat_dbport
dbroot: %%ninestat_dbuser
dbrootpwd: %%ninestat_dbpass
%else if %%dmode == "local"
dbhost: 127.0.0.1
%end if
dbtype: mysql
dbname: ninestat
dbuser: ninestat
dbpass: "changeme"
%set allow_hosts = %%getVar('ninestat_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/ninestat/gen/ninestat-create-0.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/var/www/html/ninestat/app/config/parameters.yml',
pattern: ' database_password: "',
end_pattern: '',
owner: 'root:www-data',
mod: '660' }