Configuration file inclusion directive for modular configuration management
include
The include directive inserts (lexically) another configuration file at the
current position. It is used to keep large configurations modular, reuse common
fragments (e.g. logging, backends, certificates), and simplify environment‑
specific overlays.
include "fragments/aaa-policies.radconf";
Syntax
include "<path>";
| Parameter | Description |
|---|---|
<path> | Absolute or relative filesystem path to a configuration file. Relative paths are resolved from the directory of the file that contains the include directive. |
Behavior
- The target file is read and parsed as if its content were physically present.
- Nested includes are processed depth‑first.
- Order matters: earlier includes can define sections / objects referenced by later includes.
- If an included file cannot be opened or parsed, configuration loading fails.
Example Structure
radiator.conf
├─ backends/
│ ├─ sql.radconf
│ ├─ ldap.radconf
│ └─ file.radconf
├─ aaa/
│ ├─ policies.radconf
│ └─ handlers.radconf
└─ logging.radconf
radiator.conf:
include "logging.radconf";
include "backends/sql.radconf";
include "backends/ldap.radconf";
include "backends/file.radconf";
include "aaa/policies.radconf";
include "aaa/handlers.radconf";