Operating System - HP-UX
1833466 Members
2581 Online
110052 Solutions
New Discussion

How to distribute configuration files to multiple machines

 
SOLVED
Go to solution
Peter Kain
Advisor

How to distribute configuration files to multiple machines

I have multiple(11) systems running HPUX. I'd like to be able to distribute an ASCII config file to all the systems at once from a central location. For example the /etc/group file.

Any suggestions or recommended tools.
3 REPLIES 3
Florian Heigl (new acc)
Honored Contributor

Re: How to distribute configuration files to multiple machines

Usually You'd simply loop over a list of servers like in the following:

for nodename in `cat list_of_nodes`
do
scp -qp /etc/group $nodename || echo copying to $nodename failed with error $? !

done

an automatic means for i.e. distribution from crontab that comes with the os is rdist, but I've found it to be somewhat risky for system files, which also counts for the more professional rsync program.
To be fair: I use both of them for distribution of data, and never encountered any problem.
rsync also has a daemon mode which is the ueber-feature of this product, changing the distribution from pushing to pulling the file.

If it were system files, I'd probably copy them to a /etc/group.new and have a local script do a small test (i.e. diff doesn't show unreasonable changes, number of lines doesn't drop by more than X) and mv them over on by a script in the target systems crontab, so that a unnoticed error won't easily disable all systems.


the classical way of distributing /etc/group and alike would be NIS, the Network Information Service.
yesterday I stood at the edge. Today I'm one step ahead.
harry d brown jr
Honored Contributor
Solution

Re: How to distribute configuration files to multiple machines


cfengine



http://www.cfengine.org/

live free or die
harry d brown jr
Live Free or Die
Peter Kain
Advisor

Re: How to distribute configuration files to multiple machines

The first solution with scp is basicly what I've been doing.

The cfengine is interesting. I downloaded and compiled my own verison and just ran cfagent. I really like the output. I'm still in the test stage but will probably implement it.

Thanks,

Pete