Forum: Cfengine Help
Subject: Promise structure(and other newbie q)
Author: marc
Link to topic: https://cfengine.com/forum/read.php?3,22420,22420#msg-22420

Hi List

I'm a newbie to CFengine, but so far I'm loving it. But I got some questions :-)

Just a short catch-up on how far i am:
I have gotten the client - server setup and running. I'm able to push out new 
promises to clients.
I have made a file called global_variables.cf, and I input this in me 
promises.cf. The file holds just one bundle "bundle common global", my global 
variables. This also works fine, I can call global. from all me other promises.

Here comes me first question:

I would like to organise me promises like this:


-|
 |-- OS
      |-- dns_linux.cf (promises to set and update resolv.conf on linux hosts 
redhat, centos, etc)
      |-- dns_windows.cf (promises to set and update dns info on windows hosts)
      |-- ntp_linux.cf (install and configure ntp on linux hosts)
 |-- Services
      |-- dns_services_linux.cf (promis to setup and configure a dns linux 
server)

(this is just a guess on the structure, if you have a better i'm all ears :-) )

Now I want all me control in the site.cf. So I call promises in OS/dns_linux.cf 
from me site.cf
Something like this:
body common control

{
redhat::
   bundlesequence  => { "redhat_dns" , "redhat_ntp" }; (this should get it's 
promises from e.g OS/dns_linux.cf)
}


Is this possible or i'm I doing it all wrong? 


2. question.

Is inputs only possible in promises.cf?


inputs          => {
                   "update.cf"
                   } 


3. and last question :-)

How does "inheritance" work with CFengine?

Lets say I have a smtp server running redhat.
I have some common promises for all me redhat hosts. One of them is for the 
iptables, it opens only port 22 in iptables and closes all other.
Then I have promises for a  all smtp hosts, this opens port 25 in iptables. 

I do I make sure, that me redhat hosts promises, don't closes port 25 after the 
smtp promise has opened it?


I think that was that for now :-)

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

Reply via email to