Hello,

I've been playing with cfengine for a while, copying configurations, and running them on my systems. Now I need to make then do what I need them to do. For this I need to define classes. I've been able to use hard classes to select when some bundles are run, however I've been unable to get the soft classes, I define, to work.

When I run cf-agent, the output tells me:

Skipping whole next promise (test1 Success policy_hosts defined), as c
ontext policy_hosts is not relevant

Here is the promises.cf file:

# Promises.cf

body common control
{
version => "0.1.1";

bundlesequence  => {
                        "g"
                   };
}


        
bundle common g{

# vars referred to as ${g.masterfiles} etc
    vars:
        "masterfiles" string => "/var/cfengine/masterfiles";
        "inputs" string => "${masterfiles}/inputs";
        "workdir" string => "/var/cfengine";
# add policy hosts, we only have one, 192.168.30.58
        "phost" string => "192.168.30.58";

# define classes
    classes:
        "policy_hosts" => { "cfengine.domain.com" },
           handle => "global_classes";
# The following reports section just tests the class definition
    reports:
        policy_hosts::
           "test1";
        linux::
           "test2";
}



Thank you

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to