[rancid] hostname glob - regex?
Paweł Rzepa
pawel.rzepa at gmail.com
Sun Feb 9 23:01:34 UTC 2014
W dniu 06.02.2014 08:44, Pawel Rzepa pisze:
Hi,
Any help? I've digged into this a little and found that .cloginrc is
interpreted by expect. I'm not very familiar with expect, tried some
regexps with braces, escaped braces etc and no success. Is it impossible
to use regexp in this context?
Regards,
Pawel Rzepa
> Hi,
> When I log into my devices to get configuration with rancid I must use
> two different users for two different groups of devices. I know that I
> can modify .cloginrc to achieve this:
>
> add user group-1-* {user1}
> add user group-2-* {user2}
>
> Unfortunately I am unable to describe groups of devices in such a
> consistent manner and now my .cloginrc looks like this:
>
> add user 192.168.1.* {user1}
> add password 192.168.1.* {pass1}
> add user 192.168.2.5 {user1}
> add password 192.168.2.5 {pass1}
> add user *-core-* {user1}
> add password *-core-* {pass1}
>
> add user 10.1.2.3 {user2}
> add user 10.1.5.* {user2}
> etc..
>
> Is it possible to use regular expression to describe hostname? I'd
> love to specify them like that:
>
> add user {192.168.1.*|192.168.2.5|*-core-*} {user1}
> add password {192.168.1.*|192.168.2.5|*-core-*} {pass1}
>
> add user {10.1.2.3|10.1.5.*} {user2}
> ...
>
> Best regards,
> Pawel Rzepa
More information about the Rancid-discuss
mailing list