Hello Joshua,
Thank you very much. I finally got around to trying this out and it
works nicely! But for some reason the unless grep didn't work. I had
it test for the installed gem directory:
define rubygems::install ( $ensure = 'true', $version ) {
exec { "gem-$name":
command => "/usr/local/bin/gem install $name --version $version",
onlyif => "test -f /usr/local/bin/gem",
unless => "test -d /usr/local/lib/ruby/gems/1.8/gems/${name}-$
{version}",
}
}
On Dec 26 2008, 11:05 pm, "Joshua Timberman"
<[email protected]> wrote:
> Argh. Thats what I get pre-coffee. I'd also check the syntax and add
> the missing brace in the exec:
>
>
>
> > unless => "gemlist --local rails | grep '${name}.*${version}'
> }
> > }
>
> --
> Joshua Timbermanhttp://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
-~----------~----~----~----~------~----~------~--~---