On Thu, 4 Sep 2025 20:17:04 +0100, Tom Smyth wrote:
> Folks,
> 
> sometimes in my router configs I would like to be able to declare a macro
> in one location and refer to it across multiple files,
> for instance a loopback address might be refered to in BGP, OSPF and IPSEC
> and PF configuration,
> 
> is there a way in OpenBSD of configuring aliases / variables like that and
> then using them in config files where they would be expanded / understood
> by the parser of the config file ...
> 
> or am I asking for too much and just script the changes through in config
> generators (which is what I do presently  ?
> Thanks
> 
> Tom Smyth
> 
> -- 
> Kindest regards,
> Tom Smyth.
> 

There's an "include" directive for most of the config files, which could
in theory reference shared macro definitions.

You get to keep the pieces if it breaks though.

Reply via email to