Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Corrected FreeRADIUS directory #461

Closed
wants to merge 1 commit into from
Closed

Conversation

dim-0
Copy link

@dim-0 dim-0 commented Jan 17, 2024

Modified freeradius_dir to include the 3.0/ directory

Modified freeradius_dir to include the `3.0/` directory
@dim-0
Copy link
Author

dim-0 commented Jan 17, 2024

Fixes #398

@dim-0 dim-0 changed the title Corrected FreeRADIUS directory [fix] Corrected FreeRADIUS directory Jan 18, 2024
@pandafy
Copy link
Member

pandafy commented Jan 19, 2024

I think this is already handled here

- name: Add freeradius repository into Ubuntu jammy sources list
# NOTE: The older version of openwisp.openwisp2 used to install
# FreeRADIUS 3.0.x on Ubuntu 22.04. After the release of
# Ubuntu 22.04.1, FreeRADIUS 3.0.x can no longer be installed.
# This block contains tasks that configures FreeRADIUS server
# on Ubuntu 22.04 in a backward compatible manner, i.e. if
# FreeRADIUS 3.0.x is installed on the VM, then the role will continue
# using FreeRADIUS 3.0.x. On new installations, FreeRADIUS 3.2.x
# will be used.
block:
- name: Check installed FreeRADIUS version
shell: >
which freeradius > /dev/null &&
freeradius -v | sed -n 2p | awk {'print $3'} |
awk -F '.' {'printf("%1s.%s", $1, $2)'}
ignore_errors: true
register: openwisp2_installed_freeradius_version
- name: Add FreeRADIUS 3.0.x repository to sources list
shell: >
echo "deb http://packages.networkradius.com/freeradius-3.0/ubuntu/focal focal main" |
tee /etc/apt/sources.list.d/networkradius.list > /dev/null
when: openwisp2_installed_freeradius_version.stdout == '3.0'
- name: Add FreeRADIUS 3.2.x repository to sources list
shell: >
echo "deb http://packages.networkradius.com/freeradius-3.2/ubuntu/jammy jammy main" |
tee /etc/apt/sources.list.d/networkradius.list > /dev/null
when: openwisp2_installed_freeradius_version.stdout != '3.0'
- name: Update freeradius_dir variable
set_fact:
freeradius_dir: '/etc/freeradius/3.0'
when: openwisp2_installed_freeradius_version.stdout == '3.0'

@dim-0
Copy link
Author

dim-0 commented Jan 20, 2024

Well, it looks like it should (line 29-32), but at least for me the ansible role still fails with the error message, that the directory /etc/freeradius/mods-available/sql does not exist (same as in first post in #398).
When changing as suggested here, it will successfully processes.

Maybe the error is thrown a little earlier in the role execution, before it reaches the file you posted?

@nemesifier
Copy link
Member

This change as is can't be accepted because it causes issues to systems which are using newer versions of freeradius.
I am closing for now. Feel free to reopen supplying a patch that can work in all the supported cases.
Thank you for contributing.

@nemesifier nemesifier closed this Jul 3, 2024
@dim-0 dim-0 deleted the patch-1 branch August 22, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants