ninegate/tmpl/ninegate-db.yml

48 lines
1.3 KiB
YAML

---
%set dmode = %%getVar('ninegate_db_mode','non')
%if %%dmode == "externe"
dbhost: %%ninegate_dbserver
dbport: %%ninegate_dbport
dbroot: %%ninegate_dbuser
dbrootpwd: %%ninegate_dbpass
%else if %%dmode == "local"
dbhost: 127.0.0.1
%end if
dbtype: mysql
dbname: ninegate
dbuser: ninegate
dbpass: "changeme"
%set allow_hosts = %%getVar('ninegate_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/ninegate/gen/ninegate-create-0.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/var/www/html/ninegate/app/config/parameters.yml',
pattern: ' database_password: "',
end_pattern: '',
owner: 'root:www-data',
mod: '660' }
%if %%is_defined('activer_envole_migration') and %%activer_envole_migration == 'oui'
- {file: '%%cnt_prefix/var/www/html/envole-migration/config/config-db-ninegate.php',
pattern: '$dbpwd_ninegate = "',
end_pattern: ';',
owner: 'root:www-data',
mod: '660' }
%end if