Include all options from template into other blocks?
Is there an ability to include _every_ option from `default_client` into `client name_of_client1` without moving them to separate file and with single directive? Something like that: # clients.conf default_client { secret = "TheDefaultClientSecret" require_message_authenticator = yes vlan_for_ssid-name = "50" } client name_of_client1 { $COPY ${.default_client} ipaddr = 10.1.1.1 } I understand there is ability to refer parameters one-by-one, like that: client name_of_client1 { ipaddr = 10.1.1.1 secret = ${..default_client.secret} require_message_authenticator = ${..default_client.require_message_authenticator} vlan_for_ssid-name = ${..default_client.vlan_for_ssid-name} } And there is ability to move all parameters to a separate file, like that # clients.conf client name_of_client1 { ipaddr = 10.1.1.1 $INCLUDE clients.defaults.conf } # clients.defaults.conf secret = "TheDefaultClientSecret" require_message_authenticator = yes vlan_for_ssid-name = "50" But interested in copying all set of parameters with single command.
On Feb 16, 2025, at 7:56 PM, Alexey D. Filimonov <alexey@filimonic.net> wrote:
Is there an ability to include _every_ option from `default_client` into `client name_of_client1` without moving them to separate file and with single directive?
See the templates.conf file. This situation is exactly what it's for. Alan DeKok.
Thanks. Sadly, only first instance of templates{} works in 3.2.7 - so I can not define template for clients in clients.conf and for home_servers in proxy.conf separately, is it true ? On 2025-02-17 04:53, Alan DeKok via Freeradius-Users wrote:
On Feb 16, 2025, at 7:56 PM, Alexey D. Filimonov <alexey@filimonic.net> wrote:
Is there an ability to include _every_ option from `default_client` into `client name_of_client1` without moving them to separate file and with single directive? See the templates.conf file. This situation is exactly what it's for.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Feb 17, 2025, at 1:07 AM, Alexey D. Filimonov <alexey@filimonic.net> wrote:
Thanks. Sadly, only first instance of templates{} works in 3.2.7 - so I can not define template for clients in clients.conf and for home_servers in proxy.conf separately, is it true ?
You can put both client and home_server templates into one templates.conf. While the server has separate "clients.conf" and "proxy.conf" files, they're still part of the same root configuration. All of the files are included into one unified configuration via the top-level radiusd.conf file. Alan DeKok.
participants (2)
-
Alan DeKok -
Alexey D. Filimonov