On 17 Mrz., 16:32, Gunnar Wrobel <gwro...@googlemail.com>
wrote:> Hi!
>
> I''m wondering how I could determine the currently installed
version of
> a package.
>
> This is an example of a package I defined:
>
> package { clamav:
> name => ''clamav''
> category => $operatingsystem ? {
> gentoo => ''app-antivirus'',
> # Still undefined for all other OS
> default => ''''
> },
> ensure => ''installed'',
> require => $operatingsystem ? {
> gentoo => Gentoo_use_flags[''clamav'']
> }
> }
>
> As far as I understand the package providers at the moment I can''t
use
> them to determine the version. Is that right?
I found this page now in the Puppet wiki:
http://reductivelabs.com/trac/puppet/wiki/ImprovedResourceIdentification
Looks like this has not yet been implemented. Is there a ticket
associated to these plans? Something I could track for progress? :)
Or could I already implement something like this in a single package
provider (e.g. portage)? I have been looking through the code and as
far as I can tell the query() method within portage.rb delivers a
number of properties I might be interested in. I''m not yet that
familiar with ruby so I''m not certain if there is some way to access
the information.
I''m using puppet-0.24.2
Cheers,
Gunnar
>
> Should I use facter for this? It seems like defining a special ruby
> plugin for that would be too much.
>
> Ideally I''d like to be able to do something like this:
>
> $clamav_version = determine_package_version {package =>
''clamav''}
>
> Is something like that possible?
>
> Thanks!
>
> Cheers,
>
> Gunnar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---