[rancid] Re: Leveraging rancid framework for unix

Aaron Smith smitha at byui.edu
Mon Jan 14 21:34:08 UTC 2008


On Mon, 2008-01-14 at 13:09 -0600, Sam Munzani wrote:
> Aaron,
> 
> The goal is not to just run one line command but feed a command-list
> file like we typically do on rancid. An example below of my command
> list.
> 
> sed -e 's/x.x.x.x/y.y.y.y/g' srcfile1 > tmpfile
> mv tmpfile srcfile1
> sed -e 's/snmp-community/xyz/g' srcfile2 > tmpfile
> mv tmpfile srcfile2
> 
> There are many commands like that. In short, I need to mass change
> snmp agent configuration file on all servers with new trap
> destination, new snmp string etc. This is just an example but the
> changes I need takes roughly 18 commands. If this could be achieved by
> the ssh syntax you suggested, I am all up for that.
> 
Perhaps something like this:

for a in $LIST; do scp $SCRIPTFILE $a: ; ssh $a ./$SCRIPTFILE; done

...where $SCRIPTFILE contains all the commands you need to execute.

-- 
@@ron Smith
IT Infrastructure
BYU Idaho


More information about the Rancid-discuss mailing list