I want to know what the meaning is of package_select and package_version? i am
a bit lost, eg:
* cfengine 3.1.5-20 is installed on the host (debian)
No i want to check if the installed version on my host is up to date if not
install a new version, see bundle below. I have tried all operators but in the
end it always tries to install the package. So it seems if package_select and
package_version does not work.
{{{
> cf3> Execute scheduled package update
> cf3> Command prefix: /usr/bin/aptitude --assume-yes install
> cf3> Executing /usr/bin/aptitude --assume-yes install cfengine3 ...
}}}
On 12 apr 2011, at 14:05, Bas van der Vlies wrote:
> 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: [email protected] *
> * SARA - Academic Computing Services Amsterdam, The Netherlands *
> ********************************************************************
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
--
Bas van der Vlies
[email protected]
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine