Skip to content

Commit

Permalink
[fix] Added safe_characters to freeradius SQL conf
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Aug 13, 2021
1 parent cd2eb08 commit 8bebc28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ Below are listed all the variables you can customize (you may also want to take
freeradius_sites_enabled_dir: "{{ freeradius_dir }}/sites-enabled"
freeradius_rest:
url: "https://{{ inventory_hostname }}/api/v1/freeradius"
freeradius_safe_characters: "+@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
cron_delete_old_notifications: "'hour': 0, 'minute': 0"
cron_deactivate_expired_users: "'hour': 0, 'minute': 5"
cron_delete_old_users: "'hour': 0, 'minute': 10"
Expand Down
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ freeradius_sql:
freeradius_rest:
url: "https://{{ inventory_hostname }}/api/v1/freeradius"
freeradius_expire_attr_after_seconds: 86400
freeradius_safe_characters: "+@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
cron_delete_old_notifications: "'hour': 0, 'minute': 0"
cron_deactivate_expired_users: "'hour': 0, 'minute': 5"
cron_delete_old_users: "'hour': 0, 'minute': 10"
cron_cleanup_stale_radacct: "'hour': 0, 'minute': 20"
cron_delete_old_postauth: "'hour': 0, 'minute': 30"
cron_delete_old_radacct: "'hour': 1, 'minute': 30"
cron_delete_old_radacct: "'hour': 1, 'minute': 30"
8 changes: 8 additions & 0 deletions tasks/freeradius.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
owner: freerad
group: freerad

- name: Add plus sign to safe characters
lineinfile:
path: "{{ freeradius_mods_config_dir }}/sql/main/{{ freeradius_sql.dialect }}/queries.conf"
regexp: "^(.*)safe_characters =(.*)$"
line: "safe_characters = \"{{ freeradius_safe_characters }}\""
state: present
notify: restart freeradius

- name: adding user 'freerad' to www-data group for database access
when: freeradius_sql.dialect == "sqlite"
user:
Expand Down

0 comments on commit 8bebc28

Please sign in to comment.