Le 5991 Septembre 1993, Mark Burgess a envoyé:
> Daniel,
>
> the arrays can indeed be multi-dimensional, the real question is what do you 
> want to do
> with the keys? Get indices applies only to one-dimensional arrays, so what 
> would you want
> to do with another array?
>
> e.g. getindexlist("Hosts","2")
>
> to extract a list of the second index?

Sorry for the previous mail, finger problems ;-)

I'm thinking in describing my complete network in cfengine, using it to
configure my linux routers and firewall.

For example, activating a new service on a server in a dmz will
configure the firewall to open a port.

This is only conceptual for now, I'm thinking of cfengine in two parts:
- the description of my network (zones, services, hosts, …)
- the engine to apply the configuration

I thought about using CSV files but I prefer using cfengine “structures”
which validate “somewhat” the inputs.

I thought about something like this

--8<---------------cut here---------------start------------->8---
vars:
    "Zone[dmz][srv1][ipaddress]" string => "10.2.3.4";
    "Zone[dmz][srv2][ipaddress]" string => "10.2.3.5";
    "Zone[vpn][srv3][ipaddress]" string => "10.2.6.7";
    "Zone[vpn][srv4][ipaddress]" string => "10.2.6.8";
--8<---------------cut here---------------end--------------->8---

I want to get the IP address of all the dmz hosts.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

Attachment: pgpHt5M8YiiH1.pgp
Description: PGP signature

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to