On Wed, Dec 23, 2009 at 1:53 AM, Daniel Dehennin
<[email protected]> wrote:
> Now I need to edit a file on revproxy and insert the IpAddress of
> all the hosts which define the webapp class (just one for now).
If you can centralize all the information, you can do something like this:
vars:
'asdf[somehost]' string => '1.2.3.4';
'asdf[anotherhost]' string => '1.2.3.5';
'ip_address' slist => getindices('asdf');
classes:
'webapp' expression => isvariable("asdf[${sys.host}]");
files:
revproxy::
'/some/file'
edit_line => SomeEdit(${ip_address});
This does not repeat any piece of information.
If you can't centralize the data, you will need to run cf-serverd on
all hosts and look into the peer-to-peer functionality of features
like the remotescalar() special function:
http://www.cfengine.org/manuals/cf3-reference.html#Function-remotescalar
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine