Forum: Cfengine Help
Subject: Help with basic cfengine topics
Author: mwlarsen
Link to topic: https://cfengine.com/forum/read.php?3,17687,17687#msg-17687

I'm not a programmer, and I'm having some difficulty wrapping my mind around 
certain topics discussed in the tutorials and guides. I was wondering of 
someone could explain them in non-programmer terms.

Version control in relation to cfengine deployments:

What, exactly, should be under version control? Only the central promises.cf 
that resides on the policy server? Or everything that goes under 
/var/cfengine/inputs on the policy server? Or some other set of files? 

*.cf files sections:

Why does it seem like there's a lot of redundancy in the cfengine's .cf files? 
For example, from one of the tutorials:

bundle agent testcopy
{
files:
"/home/aleksey/testcopy1"
copy_from ⇒ my_copy_body_with_options("/home/aleksey/testcopy2","192.168.1.10");
}
body copy_from my_copy_body_with_options(sourcefile,sourceserver)
{

Why is there:

copy_from ⇒ my_copy_body_with_options("/home/aleksey/testcopy2","192.168.1.10");

and

body copy_from my_copy_body_with_options(sourcefile,sourceserver)

Why not just:

bundle agent testcopy
{
files:
"/home/aleksey/testcopy1"
body copy_from 
my_copy_body_with_options("/home/aleksey/testcopy2","192.168.1.10");
}

I fail to see what you get by saying it twice.

What does the term "scope" mean as used in various tutorials that are out there?

An example is from one published at Linux Mag here:

http://www.linux-mag.com/id/7802/2/

in relation to this line:

edit_line => resolvconf("iu.hio.no cfengine.com",@{checkresolver.resolvers});

It says, "Note: we have to reference the @resolvers array using its full name, 
@checkresolver.resolvers, otherwise resolvconf will fail to find a @resolvers 
array within its own scope. The @resolvers array is in the scope of 
“checkresolver{}”

Any clarity would be appreciated. Thanks in advance.

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to