Conditional File Include

Norman Elton normelton at gmail.com
Tue Aug 8 19:17:22 UTC 2017


Yes, the goal is to keep all the configuration centralized. And a
templating mechanism would work, but adds a bit of complexity that
we've, so far, managed to avoid. Perhaps it's inevitable.

>> Just put all identical configuration to single included file
>> and include it to two distinct dhcpd.conf's each having own "failover peer"
>> statements and, perhaps, something other like "subnet".

Each system only has one /etc/dhcpd.conf, which is where I'd like to
include a host-specific file that defines the failover configuration.
But that single top-level file would need to be stored in the
repository.

Perhaps the /etc/init.d/dhcpd startup script could be modified to
point to a host-specific main config file
(/etc/dhcpd-<hostname>.conf). That's an option. Again, it's a
balancing act of introducing complexity in one place to avoid
complexity in another.

Thanks all for the ideas,

Norman





On Tue, Aug 8, 2017 at 3:56 AM, Eugene Grosbein <eugen at grosbein.net> wrote:
> 08.08.2017 3:23, Simon Hobson wrote:
>
>> Eugene Grosbein <eugen at grosbein.net> wrote:
>>
>>> Just put all identical configuration to single included file
>>> and include it to two distinct dhcpd.conf's each having own "failover peer"
>>> statements and, perhaps, something other like "subnet".
>>
>> I suspect the reason is that it moves some of the config outside of the management process.
>
> I don't see how that would occur.
>
>> While it works, it means that the config is now split in 3 places -
>> while the aim was to keep it in one place (with tracking of changes etc).
>
> One cannot keep failover configs in one place without some kind of preprocessing.
>
> And every part of config is still kept in one of 3 single places,
> either in common part or in one of individual parts.
>
> It just works.
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


More information about the dhcp-users mailing list