[rancid] change rancid.conf config setting once a week

heasley heas at shrubbery.net
Fri Dec 3 19:26:09 UTC 2021


Fri, Dec 03, 2021 at 10:02:56AM -0600, Chris Wopat:
> On Fri, Dec 3, 2021 at 9:49 AM heasley <heas at shrubbery.net> wrote:
> >
> > if a separate group is used, a group-specific rancid.conf can be used
> > to over-ride the global config.  /pathto/<groupname>/rancid.conf,
> > next to the group's router.db.
> >
> > it could be done in the environment that exececute rancid-run, but
> > other changes would be needed to facilitate that..
> 
> We have everything one group now, so in theory i could setup a 2nd
> group and i suppose have two copies of the config, each running at
> their own separate intervals?
> 
> Main downside to this is being confused as to which config to look at.

I would just send the diffmail for the secondary group to /dev/null.
you only care that the data is retained.  since it changes upon each
run, it does not indicate if the underlying information is changing.

> Any further elaboration on 'other changes' with the environment
> variable method, or is that a deep rabbit hole?

the lines in rancid.conf(s)s would need to check for an existing value; eg

- foo=value;export foo
+ foo=${foo:-value};export foo

else rancid.conf would over-ride.  I think that would be sufficient.



More information about the Rancid-discuss mailing list