I''m trying to follow the documentation to install and use puppet modules on a newly created ubuntu EC2 instance. I install them with, eg, `puppet module install puppetlabs/nodejs`, which seems to install correctly, but I can''t access the module with `class {''nodejs'':}` in either a manifest or via `apply -e`. The modules are well-formed, and they are on modulepath. Am I missing something? Does something else have to be set up for me to access modules? Detailed output below. ubuntu@ip-10-85-113-158:~$ puppet module install puppetlabs/nodejs Notice: Preparing to install into /home/ubuntu/.puppet/modules ... Notice: Created target directory /home/ubuntu/.puppet/modules Notice: Downloading from https://forge.puppetlabs.com ... Notice: Installing -- do not interrupt ... /home/ubuntu/.puppet/modules └─┬ puppetlabs-nodejs (v0.2.1) ├── puppetlabs-apt (v1.1.0) └── puppetlabs-stdlib (v3.2.0) ubuntu@ip-10-85-113-158:~$ puppet module list /home/ubuntu/.puppet/modules ├── puppetlabs-apt (v1.1.0) ├── puppetlabs-nodejs (v0.2.1) └── puppetlabs-stdlib (v3.2.0) ubuntu@ip-10-85-113-158:~$ sudo puppet apply -e "class {''nodejs'':}" Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class nodejs at line 1 on node ip-10-85-113-158.ec2.internal Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class nodejs at line 1 on node ip-10-85-113-158.ec2.internal ubuntu@ip-10-85-113-158:~$ uname -a Linux ip-10-85-113-158 3.2.0-36-virtual #57-Ubuntu SMP Tue Jan 8 22:04:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux ubuntu@ip-10-85-113-158:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise ubuntu@ip-10-85-113-158:~$ puppet --version 3.1.0 ubuntu@ip-10-85-113-158:~$ puppet config print modulepath /home/ubuntu/.puppet/modules:/usr/share/puppet/modules ubuntu@ip-10-85-113-158:~$ head -20 /home/ubuntu/.puppet/modules/nodejs/manifests/init.pp # Class: nodejs # # Parameters: # # Actions: # # Requires: # # Usage: # class nodejs( $dev_package = false, $proxy = '''' ) inherits nodejs::params { case $::operatingsystem { ''Debian'': { include ''apt'' apt::source { ''sid'': ubuntu@ip-10-85-113-158:~$ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ryan Coleman
2013-Feb-25 08:33 UTC
Re: [Puppet Users] I can''t access modules, for some reason
On Sun, Feb 24, 2013 at 9:11 PM, James Gill <james@madeye.io> wrote:> Am I missing something? Does something else have to be set up for me to > access modules? Detailed output below. >Try running `sudo puppet config print modulepath`. While you''re using `puppet apply` as a super user, every other command you''ve offered is run as your user account. I''m betting that the different contexts have separate modulepaths so you''ll want to move things around or re-run your `puppet module` commands with sudo. Cheers! -- Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.