I have a /var/cfengine/hostlib directory on each host, and files the server needs to know about get copied over to that directory. The server periodically iterates thru the client list syncing that directory to a 'master hostlib' area (on the server). This requires me to autogenerate a 'cf.hostlibs' file that does the syncing on the server. (If that worries you, just iterate across a list using shellcommands and rsync.)
If you are lucky enough to be able to get away with it, using NFS is an easy way to go. Assign each host a writable directory on the NFS server and have them dump things the server needs to know into that directory.
Erik Dykema wrote:
Hi-
I have an interesting problem which I haven't been able to find the answer to in the documentation...
I have a fairly typical setup where there is a 'master' server and a number of 'slave' servers, which update and get configuration data from the master.
The slaves also run scripts and produce output files (for example "up2date -u > /output/hostnameoutput.txt").
I'd like an easy way to get this output file back to the master, for processing by a web server. I figured out how to do it by exporting the file via NFS on the slaves, or by exporting a Read/Write directory on the master, or by means of some webserver tricks, but what I'd really like to do is something like a copy statement of the following:
# Imaginary code tidbit
slavehostnames = ( slave1 slave2 slave3 )
copy: masterserver:: /output/$(slavehostnames)output.txt dest=/from_slaves/$(slavehostnames)output.txt server= slavehostnames
# End imaginary code
Which would cause the master server to copy from the slave servers their files, such that it would copy:
from slave1 /output/slave1output.txt to /from_slaves/slave1output.txt from slave2 /output/slave1output.txt to /from_slaves/slave2output.txt from slave3 /output/slave1output.txt to /from_slaves/slave3output.txt
Does this make sense? Can it be done?
thanks, Erik
_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine
--
Chip Seraphine Unix Administrator TradeLink, LLC 312-264-2048 [EMAIL PROTECTED]
_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine