[rancid] hostname glob - regex?

Paweł Rzepa pawel.rzepa at gmail.com
Thu Feb 6 07:44:01 UTC 2014


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