ninegate/tmpl/cadolesuser-db.yml

49 lines
1.2 KiB
YAML

---
%set dmode = %%getVar('cadolesuser_db_mode','non')
%if %%dmode == "default"
%set dmode = %%getVar('edb_local','non')
%end if
%if %%dmode == "oui"
%set dmode = "local"
%end if
dbmode: %%dmode
grantall: true
%if %%dmode == "externe"
dbhost: %%cadolesuser_dbserver
dbport: %%cadolesuser_dbport
dbroot: %%cadolesuser_dbuser
dbrootpwd: %%cadolesuser_dbpass
%else if %%dmode == "local"
dbhost: 127.0.0.1
%end if
dbtype: mysql
dbname: cadolesuser
dbuser: cadolesuser
dbpass: "changeme"
%set allow_hosts = %%getVar('cadolesuser_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/cadolesuser/gen/cadolesuser-create-0.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/var/www/html/cadolesuser/app/config/parameters.yml',
pattern: ' database_password: "',
end_pattern: '',
owner: 'root:www-data',
mod: '660' }