[rancid] Re: .cloginrc question. How to use wild card?
Mike Ashcraft
mashcraft at omniture.com
Fri Feb 15 18:43:26 UTC 2008
Sam,
Put the entire hostname glob inside the curly braces.
For example:
Add user {test*[1-2]} {admin}
Mike
From: rancid-discuss-bounces at shrubbery.net
[mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Sam Munzani
Sent: Friday, February 15, 2008 11:27 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] .cloginrc question. How to use wild card?
Team,
I have my devices named like this. xxx-rtr01, xxx-rtr02, xxx-rtr03 etc
all the way up to 10. routers 1 through 6 supports telnet method only
while 7 through 10 supports ssh only. Is there a clean way to define
these 2 groups in .cloginrc? I tried following and captured the error
messages.
Experiment # 1: .cloginrc section
add user test*[1-2] {admin}
add password test*[1-2] {password}
add method test*[1-2] telnet
add autoenable test*[1-2] 1
$ clogin test-rtr01
Error: invalid command name "1-2"
Experiment # 2:
add user test*{*\[1-6]} {admin}
add password test*{*\[1-6]} {password}
add method test*{*\[1-6]} telnet
add autoenable test*{*\[1-6]} 1
$ clogin test-rtr01
test-rtr01
Error: no password for test-rtr01 in /opt/rancid/.cloginrc.
Experiment # 3:
add user test{*\[1-6]} {admin}
add password test{*\[1-6]} {password}
add method test{*\[1-6]} telnet
add autoenable test{*\[1-6]} 1
$ clogin test-rtr01
test-rtr01
Error: no password for test-rtr01 in /opt/rancid/.cloginrc.
Any help is greatly appreciated.
Thanks,
sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20080215/82f66618/attachment.html
More information about the Rancid-discuss
mailing list