I have the following bundle on debian:
bundle agent cfengine_upgrade_package(version)
{
     vars:
         debian::
             "package_name" string => "cfengine3";

     packages:
         "$(package_name)"
                 package_select => ">=",
                 package_version => "$(version)",
                 package_policy  => "update",
                 package_method  => generic,
                 classes     => pkg_repaired("software_installed");

         reports:
                 software_installed::
                     "CFengine is version is up to date: $(version)";
                 !software_installed::
                     "CFengine is version is NOT up to date";
}

bundle agent quarterly {

     methods:
         any::
             "any" usebundle => cfengine_upgrade_package("3.1.5-20");
}

I tried all posibilities for 'package_select':
  * >=, <=, >, <

In the output -v. I always see that the package will be installed. No 
matter if it is already the right version is installed. Is this the 
intended behaviour or is there something wrong with my promise?
?

cf3>  -> Matched name cfengine3
cf3>  -> Matched version *
cf3>  -> Looking for (cfengine3,3.1.5-20,*)
cf3>  -> Matched name cfengine3
cf3>  -> Check for compatible versioning model in (3.1.5-20,3.1.5-20)
cf3>  -> Verified that versioning models are compatible
cf3>  -> Verified version constraint promise kept
cf3> Checking if package (cfengine3,3.1.5-20,*) is at the desired state 
(installed=1,matched=1)
cf3>  -> Package promises to refer to itself as "cfengine3" to the manager
cf3>  -> Package version seems to match criteria
cf3>  -> Schedule package for update
cf3>  -> Package (cfengine3,any,any) found
cf3>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cf3>    Offering these package-promise suggestions to the managers
cf3>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cf3>  -> Deletion schedule...
cf3>  -> Addition schedule...
cf3>  -> Update schedule...
cf3> Execute scheduled package update
cf3> Command prefix: /usr/bin/aptitude --assume-yes install
cf3> Executing /usr/bin/aptitude --assume-yes install cfengine3 ...


-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to