Hi,
I''m attempting to move from 0.24.x to 2.6.x :) trying to fix all those
parts
that have changed, and found that the use of plugins we are doing is
probably not the best approach hoping you can help me with comments
regarding this use case.
In our working 0.24.x environment we had to make use of plugins to add an
attribute in the package.rb, something like:
*newparam(:ignoredeps)*
Then on the rpm.rb a flag to add "--nodeps" was added.
* flags = []*
* if @resource[:ignoredeps]*
* flags << "--nodeps"*
* end*
* flags << "-e"*
* rpm flags, nvr*
All this because we needed to remove some packages without its dependencies.
We distributed it with the pluginsync enabled in our puppet.conf, and works
as expected.
What I don''t like at all is that we have to export all the providers
that
make use of the package.rb type, all this just for a small change like this,
since my experience with ruby is close to nothing I would like to know if it
would be possible to integrate such change without the need of importing all
the providers, or any alternative solution to my use case.
This is a simplified version of a class we are using, on which we need to
remove packages without its dependencies:
class ssh {
$ssh_pkgs_in = $use_lpk ? {
true => ["openssh-lpk", "openssh-lpk-clients",
"openssh-lpk-server"],
false => ["openssh", "openssh-clients",
"openssh-server"],
}
$ssh_pkgs_out = $use_lpk ? {
true => ["openssh", "openssh-clients",
"openssh-server"],
false => ["openssh-lpk", "openssh-lpk-clients",
"openssh-lpk-server"],
}
package {
$ssh_pkgs_in:
ensure => "latest",
notify => Service["sshd"],
require => Package[$ssh_pkgs_out];
$ssh_pkgs_out:
ensure => "absent",
*ignoredeps* => true;
}
}
The node definition then looks something like:
node "puppet.example.com" {
$use_lpk = true
include ssh
}
Thanks.
--
Tony
http://blog.tonyskapunk.net
--
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.