Sandra,
The one thing that initially catches my eye is your definition of the
policy_hosts class. In your class list, you have a fully-qualified
hostname with dots but Cfengine "canonifies" all classes, turning dots
and other non-alphanumeric characters (dashes, etc.) into underscores.
So try this:
"policy_hosts" => { "cfengine_domain_com" },
handle => "global_classes";
Justin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sandra
Wittenbrock
Sent: Wednesday, May 05, 2010 12:36 PM
To: [email protected]
Subject: defining classes
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
This electronic communication and any attachments may contain confidential and
proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient, or an
agent or employee
responsible for delivering this communication to the intended recipient, or if
you have received
this communication in error, please do not print, copy, retransmit, disseminate
or
otherwise use the information. Please indicate to the sender that you have
received this
communication in error, and delete the copy you received. DigitalGlobe reserves
the
right to monitor any electronic communication sent or received by its
employees, agents
or representatives.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine