On Fri, Dec 26, 2008 at 12:38 AM, gary <[email protected]> wrote:
>
> I'm starting to add gems as virtual resources. Some of them have the
> same name as default provider packages. If I want to realize them,
> should I define the package with an alias? Like:
>
> @package {'mysql':
> ensure => present,
> alias => 'mysqlgem',
> provider => gem,
> }
I'd use a define.
define gem_package($ensure = 'true', $version) {
exec { "gem-package-$name":
path => "/path/to/gem_command",
command => "gem install --version $version $name",
unless => "gem list --local rails | grep '${name}.*${version}'
}
You can add more command options too, such as handling a different gem
server. Or disable ri and rdoc.
--
Joshua Timberman
http://twitter.com/jtimberman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---