A few updates, comment inline with original post. On Wednesday, June 27, 2012 11:12:15 AM UTC-5, llo...@oreillyauto.com wrote: > > I have a module located at /etc/puppet/environments/test/modules/ruby. > I > n this I have a manifests folder with two .pp files - init.pp and > gemInstall.pp. > > In one of my node def files I have: > > include ruby > > ruby::gemInstall { 'someGem-version.gem': > path => '/path/to/agent/local/gem/repo', > } > > ruby::gemInstall is a define, and it has some logic to get around some > problems I had when trying to install gems via a package resource, the > source is below. > > I refactored and made some changes in testing a few things, current version is:
define ruby::gemInstall ( r_gem = $name, r_path = hiera('v_rubygem_path') ){ r_gemName = regsubst($r_gem, '([^-]+)-.*\.gem', '\1') exec { "gem_install_${r_gemName}": command => "/usr/local/bin/gem install ${r_gemName}", cwd => $r_path, unless => "gem list -i ${r_gemName}", require => Package['rubygems'], } } > But when I try to apply this, I get the following: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid > resource type ruby::gemInstall at > /etc/puppet/environments/test/manifests/nodes/MyNodeDef.pp:84 on node XX > > Am I doing something wrong when it comes to auto-loading classes and > defines, or is this an instance of this bug ( > http://projects.puppetlabs.com/issues/13858) cropping up? > > I've also ran puppet-lint against this file, and it thinks /all/ the variables are "top-scope variable being used without an explicit namespace" . One of my coworkers looked at this, and thinks it is a syntax error of some sort. The puppet-lint results make me think that too, but for the life of me I can't find what it is. Also, I don't think it is that bug I referenced because I have several other defines in different modules that work perfectly. Thanks. > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/l4v2zxG2Pc0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.