[rancid] Re: provisioning a config with rancid

Arne Svennevik arne.svennevik at met.no
Mon Jul 12 13:25:51 UTC 2010


----- Original Message -----
> i noticed the [-x command-file] usage and was wondering if this is
> perhaps the way to provision commands to the switches...like if I
> wanted to change the password on a few different switches at once.

You're right, you can use the -x switch to push config to several switches at once. We use it regularly to make sure a set of devices are configured the same way, like this:
  bin/clogin -x <file>  switch1 switch2 switch3 switch4

Just place the set of commands to execute in the text file and run clogin. It will log in to each device, run the set of commands and log off again. The list of commands can for example be:
 conf t
 enable secret <something>
 exit
 wr mem


If you only need to execute one command on each device, instead use the -c switch like this:
  bin/clogin -c "show version"  switch1 switch2 switch3 switch4


Regards,
Arne Svennevik


More information about the Rancid-discuss mailing list