I have these three modules with the following structure:
|-- modules
| |-- create_resources
| | |-- LICENSE
| | |-- Modulefile
| | |-- README
| | |-- lib
| | | `-- puppet
| | | `-- parser
| | | `-- functions
| | | `-- create_resources.rb
| | |-- spec
| | | |-- spec.opts
| | | |-- spec_helper.rb
| | | `-- unit
| | | `-- puppet
| | | `-- parser
| | | `-- functions
| | | `-- create_resources_spec.rb
| | `-- tests
| | `-- users.pp
| |-- hiera
| | |-- CHANGES.txt
| | |-- COPYING
| | |-- README.md
| | |-- Rakefile
| | |-- bin
| | | `-- extlookup2hiera
| | |-- example
| | | |-- README.md
| | | |-- etc
| | | | |-- hiera.yaml
| | | | |-- hieradb
| | | | | |-- common.yaml
| | | | | |-- dc1.yaml
| | | | | `-- development.yaml
| | | | `-- puppet.conf
| | | |-- modules
| | | | |-- data
| | | | | `-- manifests
| | | | | `-- common.pp
| | | | |-- ntp
| | | | | |-- manifests
| | | | | | |-- config.pp
| | | | | | `-- data.pp
| | | | | `-- templates
| | | | | `-- ntp.conf.erb
| | | | `-- users
| | | | `-- manifests
| | | | |-- common.pp
| | | | |-- dc1.pp
| | | | `-- development.pp
| | | `-- site.pp
| | |-- lib
| | | |-- hiera
| | | | |-- backend
| | | | | `-- puppet_backend.rb
| | | | `-- scope.rb
| | | `-- puppet
| | | `-- parser
| | | `-- functions
| | | |-- hiera.rb
| | | |-- hiera_array.rb
| | | |-- hiera_hash.rb
| | | `-- hiera_include.rb
| | `-- spec
| | |-- spec.opts
| | |-- spec_helper.rb
| | `-- unit
| | |-- puppet_backend_spec.rb
| | `-- scope_spec.rb
| `-- tomcat
| |-- files
| | `-- war
| | |-- jenkins_1.423.war
| | |-- jenkins_1.424.war
| | |-- jenkins_1.425.war
| | |-- snoop-servlet.war
| | |-- snoop-servlet_1.0.war
| | `-- snoop-servlet_2.0.war
| |-- manifests
| | |-- demo.pp
| | |-- init.pp
| | |-- instance.pp
| | `-- war.pp
| |-- templates
| | |-- server.xml.erb
| | |-- start.sh.erb
| | `-- stop.sh.erb
| `-- tests
| `-- init.pp
Puppet apply gives the following:
[root@puppetmaster puppet]# puppet apply -vd --noop modules/tomcat/
tests/init.pp
info: Loading facts in facter_dot_d
info: Loading facts in facter_dot_d
warning: Could not retrieve fact fqdn
warning: Host is missing hostname and/or domain: puppetmaster
debug: importing ''/etc/puppetlabs/puppet/modules/tomcat/manifests/
init.pp'' in environment production
debug: Automatically imported tomcat from tomcat into production
debug: Failed to load library ''selinux'' for feature
''selinux''
debug: hiera(): Hiera YAML backend starting
debug: hiera(): Looking up tomcat_instance in YAML backend
debug: hiera(): Looking for data source puppetmaster
debug: importing ''/etc/puppetlabs/puppet/modules/tomcat/manifests/
instance.pp'' in environment production
debug: Automatically imported tomcat::instance from tomcat/instance
into production
warning: Could not find class create_resources for puppetmaster
Could not find class create_resources at /etc/puppetlabs/puppet/
modules/tomcat/tests/init.pp:3 on node puppetmaster
Init.pp looks like this in tests:
[root@puppetmaster puppet]# cat modules/tomcat/tests/init.pp
node default {
include tomcat
include create_resources
include hiera
}
I don''t understand why my class doesn''t find the other
classes. Can
anyone shed some light?
Thanks,
Berry Sizemore
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Hi Berry, create_resources doesn''t have an init.pp so you can''t ''include'' it AFAIK. As long as you''ve enabled pluginsync you shouldn''t have to include it, it should just work. On Tue, Dec 6, 2011 at 12:13 PM, Berry Sizemore <berry.sizemore@gmail.com> wrote:> I have these three modules with the following structure: > > |-- modules > | |-- create_resources > | | |-- LICENSE > | | |-- Modulefile > | | |-- README > | | |-- lib > | | | `-- puppet > | | | `-- parser > | | | `-- functions > | | | `-- create_resources.rb > | | |-- spec > | | | |-- spec.opts > | | | |-- spec_helper.rb > | | | `-- unit > | | | `-- puppet > | | | `-- parser > | | | `-- functions > | | | `-- create_resources_spec.rb > | | `-- tests > | | `-- users.pp > | |-- hiera > | | |-- CHANGES.txt > | | |-- COPYING > | | |-- README.md > | | |-- Rakefile > | | |-- bin > | | | `-- extlookup2hiera > | | |-- example > | | | |-- README.md > | | | |-- etc > | | | | |-- hiera.yaml > | | | | |-- hieradb > | | | | | |-- common.yaml > | | | | | |-- dc1.yaml > | | | | | `-- development.yaml > | | | | `-- puppet.conf > | | | |-- modules > | | | | |-- data > | | | | | `-- manifests > | | | | | `-- common.pp > | | | | |-- ntp > | | | | | |-- manifests > | | | | | | |-- config.pp > | | | | | | `-- data.pp > | | | | | `-- templates > | | | | | `-- ntp.conf.erb > | | | | `-- users > | | | | `-- manifests > | | | | |-- common.pp > | | | | |-- dc1.pp > | | | | `-- development.pp > | | | `-- site.pp > | | |-- lib > | | | |-- hiera > | | | | |-- backend > | | | | | `-- puppet_backend.rb > | | | | `-- scope.rb > | | | `-- puppet > | | | `-- parser > | | | `-- functions > | | | |-- hiera.rb > | | | |-- hiera_array.rb > | | | |-- hiera_hash.rb > | | | `-- hiera_include.rb > | | `-- spec > | | |-- spec.opts > | | |-- spec_helper.rb > | | `-- unit > | | |-- puppet_backend_spec.rb > | | `-- scope_spec.rb > | `-- tomcat > | |-- files > | | `-- war > | | |-- jenkins_1.423.war > | | |-- jenkins_1.424.war > | | |-- jenkins_1.425.war > | | |-- snoop-servlet.war > | | |-- snoop-servlet_1.0.war > | | `-- snoop-servlet_2.0.war > | |-- manifests > | | |-- demo.pp > | | |-- init.pp > | | |-- instance.pp > | | `-- war.pp > | |-- templates > | | |-- server.xml.erb > | | |-- start.sh.erb > | | `-- stop.sh.erb > | `-- tests > | `-- init.pp > > > > Puppet apply gives the following: > > > [root@puppetmaster puppet]# puppet apply -vd --noop modules/tomcat/ > tests/init.pp > info: Loading facts in facter_dot_d > info: Loading facts in facter_dot_d > warning: Could not retrieve fact fqdn > warning: Host is missing hostname and/or domain: puppetmaster > debug: importing ''/etc/puppetlabs/puppet/modules/tomcat/manifests/ > init.pp'' in environment production > debug: Automatically imported tomcat from tomcat into production > debug: Failed to load library ''selinux'' for feature ''selinux'' > debug: hiera(): Hiera YAML backend starting > debug: hiera(): Looking up tomcat_instance in YAML backend > debug: hiera(): Looking for data source puppetmaster > debug: importing ''/etc/puppetlabs/puppet/modules/tomcat/manifests/ > instance.pp'' in environment production > debug: Automatically imported tomcat::instance from tomcat/instance > into production > warning: Could not find class create_resources for puppetmaster > Could not find class create_resources at /etc/puppetlabs/puppet/ > modules/tomcat/tests/init.pp:3 on node puppetmaster > > > > Init.pp looks like this in tests: > > [root@puppetmaster puppet]# cat modules/tomcat/tests/init.pp > node default { > include tomcat > include create_resources > include hiera > } > > I don''t understand why my class doesn''t find the other classes. Can > anyone shed some light? > > Thanks, > Berry Sizemore > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Possibly Parallel Threads
- Does create_resources support virtual resources?
- How to pass puppet/hiera veriable to external script ? Do I need to ?
- Failed to parse template, wrong number of arguments (create_resources)
- Profiles, Hiera, and create_resources('class','...')
- Using single hiera hash for two create_resources, and mounting filesystems