infra/ansible/roles/freeradius/templates/sql.j2
2026-07-12 15:35:31 -05:00

74 lines
1.6 KiB
Django/Jinja

# -*- text -*-
##
## mods-available/sql -- SQL module configuration
##
## Managed by Ansible — do not edit manually.
##
sql {
dialect = "{{ freeradius_sql_dialect }}"
driver = "{{ freeradius_sql_driver }}"
sqlite {
filename = "/tmp/freeradius.db"
busy_timeout = 200
bootstrap = "${modconfdir}/${..:name}/main/sqlite/schema.sql"
}
mysql {
warnings = auto
}
postgresql {
send_application_name = yes
}
mongo {
appname = "freeradius"
tls {
certificate_file = /path/to/file
certificate_password = "password"
ca_file = /path/to/file
ca_dir = /path/to/directory
crl_file = /path/to/file
weak_cert_validation = false
allow_invalid_hostname = false
}
}
server = "{{ freeradius_db_host }}"
port = {{ freeradius_db_port }}
login = "{{ freeradius_db_user }}"
password = "{{ vault_freeradius_db_password }}"
radius_db = "{{ freeradius_db_name }}"
acct_table1 = "radacct"
acct_table2 = "radacct"
postauth_table = "radpostauth"
authcheck_table = "radcheck"
groupcheck_table = "radgroupcheck"
authreply_table = "radreply"
groupreply_table = "radgroupreply"
usergroup_table = "radusergroup"
delete_stale_sessions = yes
pool {
start = ${thread[pool].start_servers}
min = ${thread[pool].min_spare_servers}
max = ${thread[pool].max_servers}
spare = ${thread[pool].max_spare_servers}
uses = 0
retry_delay = 30
lifetime = 0
idle_timeout = 60
}
read_clients = {{ 'yes' if freeradius_read_clients else 'no' }}
client_table = "{{ freeradius_client_table }}"
group_attribute = "SQL-Group"
$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
}