Hi there,
I just found out that the smart package provider naively always
installs the latest package from you repository.
It doesn't matter if you explicitly set the package to just being
installed or present.
For example:
puppetmaster:
package { "iptraf": ensure => installed }
puppetclient:
debug: Puppet::Type::Package::ProviderSmart: Executing '/usr/bin/
python /usr/lib64/ruby/site_ruby/1.8/puppet/provider/package/
smarthelper.py iptraf'
debug: Package[iptraf](provider=smart): Ensuring => present
debug: Puppet::Type::Package::ProviderSmart: Executing '/usr/bin/smart
install --yes iptraf'
notice: /Stage[main]/Pakete/Package[iptraf]/ensure: created
I can see that the provider/package/smart.rb has a query method and
after I added an additional debug statement, I can see that the query
method gets called by every package.
But inside the query function the actual smarthelper.py script gets
called with the name of the package and installs the latest package
from the repository.
Now what would be the best solution, can I call rpm -qa and grep the
package or change the smarthelper script to check if the package is
installed beforehand?
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.