help-cfengine
[Top][All Lists]
Advanced

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

Re: editfiles methodology question


From: Mark Burgess
Subject: Re: editfiles methodology question
Date: Sun, 06 Nov 2005 22:07:16 +0100

> 
> Regarding short_hostname, on my system '/bin/hostname' returns the
> FQDN. If I try using $(host), I just get the FQDN. Is that normal?
> That's why I'm using my own variable.
> 

This is normal if you have fully qualified names returned by your
hostname lookup, which is not something I recommend. 

> > If the file contains $(macro) like instances already, you could simply
> > ask cfagent to expand them using "ExpandVariables". Alernatively you
> > could use a
> 
> I'm a little confused on how to use template files. Since the template
> file is on a server, how do I get it part of the editfiles? I'm only
> familiar with using 'server=' in copy:. Do I need to copy the file
> over first? If so, how do I make sure to do that before an edit (and
> if possible, to avoid worrying about this ordering)?

Yes you need to copy the file first. You can do


copy:

  destination src=source server=server define=gotfile


editfiles:

 gotfile::

   { destination
   ....
   }





reply via email to

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