Le 5957 Septembre 1993, Brendan Strejcek a envoyé: > 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.
Thanks a lot, I centralise all the informations. I will combine an associative array of all the IP addresses of hosts with a list of webapp hosts. > 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 Look interesting, I have not finished the reference manual yet. Regards. -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
pgpV9T6vWoP1l.pgp
Description: PGP signature
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine