[rancid] Re: .cloginrc question. How to use wild card?
john heasley
heas at shrubbery.net
Fri Feb 15 18:32:44 UTC 2008
Fri, Feb 15, 2008 at 12:27:21PM -0600, Sam Munzani:
> 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.
its a glob & first match.
add method xxx-rtr0\[1-6] {telnet}
add method xxx-rtr* {ssh}
the quoting is necessary to avoid tcl's [] grammar.
> *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
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
More information about the Rancid-discuss
mailing list