[Puppet Users] Could not find declared class transfer_contents

2015-03-12 Thread Greg Heaphy
Hi there, 

I am going through this 
tutorial: 
http://projects.puppetlabs.com/projects/1/wiki/simplest_puppet_install_pattern

I am having trouble with Step two: Create a test manifests - specifially 
the application of tests manifests with the noop flag

my current configuration is as follows:

/home/redshelf/source/puppet
which contains: nothing

/etc/puppet/modules/transfer_contents/manifests/init.py
which contains:
class transfer_contents {
file { /home/redshelf/source/puppet/rc.local:
ensure = 'present',
mode = '740',
content = '#!/bin/sh
umount /dev/xvdb || :
mkswap /dev/xvdb
swapon /dev/xvdb
exit 0'
  }
}


/etc/puppet/modules/transfer_contents/tests/init.py

which contains:

 class {'transfer_contents': }


I then run the command:

puppet apply --noop /etc/puppet/modules/transfer_contents/tests/init.pp

and I get:

*Warning: Could not retrieve fact fqdn*

*Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
Could not find declared class transfer_contents at 
/etc/puppet/modules/transfer_contents/tests/init.pp:1 on node redshelf-dev*

*Wrapped exception:*

*Could not find declared class transfer_contents*

*Error: Puppet::Parser::AST::Resource failed with error ArgumentError: 
Could not find declared class transfer_contents at 
/etc/puppet/modules/transfer_contents/tests/init.pp:1 on node redshelf-dev*


 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4ce61c0a-48e6-4c32-810e-618c8d3b7bb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Could not find declared class transfer_contents

2015-03-12 Thread Adrien Thebo
Hi Greg,

This file, /etc/puppet/modules/transfer_contents/manifests/init.py, has a
file extension of .py. Puppet uses a file extension of .pp. Try
changing that and see if it resolves your issue.


On Thu, Mar 12, 2015 at 10:40 AM, Greg Heaphy heap...@gmail.com wrote:

 Hi there,

 I am going through this tutorial:
 http://projects.puppetlabs.com/projects/1/wiki/simplest_puppet_install_pattern

 I am having trouble with Step two: Create a test manifests - specifially
 the application of tests manifests with the noop flag

 my current configuration is as follows:

 /home/redshelf/source/puppet
 which contains: nothing

 /etc/puppet/modules/transfer_contents/manifests/init.py
 which contains:
 class transfer_contents {
 file { /home/redshelf/source/puppet/rc.local:
 ensure = 'present',
 mode = '740',
 content = '#!/bin/sh
 umount /dev/xvdb || :
 mkswap /dev/xvdb
 swapon /dev/xvdb
 exit 0'
   }
 }


 /etc/puppet/modules/transfer_contents/tests/init.py

 which contains:

  class {'transfer_contents': }


 I then run the command:

 puppet apply --noop /etc/puppet/modules/transfer_contents/tests/init.pp

 and I get:

 *Warning: Could not retrieve fact fqdn*

 *Error: Puppet::Parser::AST::Resource failed with error ArgumentError:
 Could not find declared class transfer_contents at
 /etc/puppet/modules/transfer_contents/tests/init.pp:1 on node redshelf-dev*

 *Wrapped exception:*

 *Could not find declared class transfer_contents*

 *Error: Puppet::Parser::AST::Resource failed with error ArgumentError:
 Could not find declared class transfer_contents at
 /etc/puppet/modules/transfer_contents/tests/init.pp:1 on node redshelf-dev*




  --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/4ce61c0a-48e6-4c32-810e-618c8d3b7bb0%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/4ce61c0a-48e6-4c32-810e-618c8d3b7bb0%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Adrien Thebo | Puppet Labs

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALVJ9SJquuFA5CeK8%3DX4patxdGGsn9D3t5JPBACkY0mUafuafA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.