help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scalable remote config


From: skaar
Subject: Re: Scalable remote config
Date: Sun, 16 Nov 2003 14:55:44 -0500
User-agent: Mutt/1.4i

* Lance Albertson (ramereth@gentoo.org) [031115 19:33]:
> Ok, here's the senario:
> 
> Have an application that has one configuration file. All the remote
> boxes have a 'default' set of values in the config file I want to keep
> in one file. But the other part of the file is host dependant. I tried
> using editfiles with InsertFile to append two files and create a new
> config file. I then realized that editfiles does not support copying to
> remote boxes. 
> 
> One way around this is to use editfiles on the local master server,
> creating appending the files there, and then using copy to distribute
> the files to the remote boxes. To me and my peers, this is an ugly way
> around our problem.
> 
> Is there a better solution to this problem?

I actually think that cfengine do this the right way, since the edit
operation and the copy operation has very different criterias to
succeed.

If you split it up and have:

  copy templates from policy host
  editfiles / InsertFile on the client side with the logic in cfengine


control:

  masterfiles = ( /var/cfengine/masterfiles )
  inputs      = ( /var/cfengine/inputs )


# this is just one file, you will probably have a copy operation
# that copies more files at the time

copy:
  /path/to/template.in
    dest=$($masterfiles)/template.in
    server=$(policyhost);
 

editfiles:
  { /path/to/result.file
    EmptyEntireFilePlease
    InsertFile $(masterfiles)/template.in
    ReplaceAll "TEMPLATE_VALUE" With "$(host_value);
  }

  
/skaar


> 
> Thanks,
> -- 
> Lance Albertson       <ramereth@gentoo.org>
> Gentoo Infrastructure



> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine


-- 
/skaar

+-------------------------------------------------------------------+
+----- skaar@aol.net                   kent skaar   ----------------+
+----- internet services: infrastructure security   ----------------+
+-------------------------------------------------------------------+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]