Hi List,

Puppet Version: v2.7.13

Question - If I correctly setup multiple manifestdir's in the puppet.conf
file how can I import a node pp file located in a different directory tree
to site.pp?

My configuration information is below.

In my puppet.conf file I have setup an environment called "stable", within
this environment I have setup the manifestdir, modulepath and manifest
settings like so:

------------------------- (Begin Extract) --------------------------------

[stable]
*manifestdir*=/srv/puppetmaster/stable/manifests:*
/srv/puppetmaster/stable/site-nodes*
modulepath=/srv/puppetmaster/stable/modules:/srv/puppetmaster/stable/site-modules
*manifest=/srv/puppetmaster/stable/manifests/site.pp*

------------------------- (End    Extract) --------------------------------


If I run a config print against the manifestdir against the
stable environment it outputs the correct paths:

------------------------- (Begin Extract) --------------------------------
root@core ~# *puppet config print --environment stable manifestdir*
/srv/puppetmaster/stable/manifests:/srv/puppetmaster/stable/site-nodes
------------------------- (End    Extract) --------------------------------

In my site.pp file I have

------------------------- (Begin Extract) --------------------------------
 root@core stable/manifests# pwd
/srv/puppetmaster/stable/manifests

root@core stable/manifests# cat site.pp
Exec { path =>
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }

import "core.mob.ifoley.local.pp"

node default {

  fail ("

    Please create a node file for this computer !

")
}
------------------------- (End    Extract) --------------------------------

In my core.mob.ifoley.local pp file I have

------------------------- (Begin Extract) --------------------------------

root@core stable/site-nodes# pwd
/srv/puppetmaster/stable/site-nodes

root@core stable/site-nodes# cat core.mob.ifoley.local.pp
node 'core.mob.ifoley.local' {
  notice("Inside core pp file")
}


------------------------- (End    Extract) --------------------------------

On the puppet client when I run the Puppet apply it gives the below output.

------------------------- (Begin Extract) --------------------------------

root@core ~# puppet agent --server puppet.mob.ifoley.local --environment
stable --no-daemonize --verbose --onetime
info: Retrieving plugin
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in
/etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in
/etc/puppet/modules/concat/lib/facter/concat_basedir.rb
info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
*err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment stable: No file(s) found for import of
'core.mob.ifoley.local.pp' at /srv/puppetmaster/stable/manifests/site.pp:8
on node core.mob.ifoley.local*
info: Not using expired catalog for core.mob.ifoley.local from cache;
expired at Wed Apr 25 08:22:31 +1000 2012
notice: Using cached catalog
err: Could not retrieve catalog; skipping run

------------------------- (End    Extract) --------------------------------

If I move the core.mob.ifoley.local.pp file into the same directory as the
site.pp file then it correctly imports the file and spits out the notice
message.

Am I doing something wrong?

Any help would be greatly appricated.

Thanks,

Peter.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to