is nodes.pp a default file?

111 views
Skip to first unread message

Hai Tao

unread,
Jul 5, 2012, 10:57:55 PM7/5/12
to puppet...@googlegroups.com
Hi,

is nodes.pp a default file,like sites.pp, or I have to import it in puppet.conf?

I cannot find a paramater in "puppetmasterd genconfig | grep nodes.pp", can someone advice?

Thanks.

Peter Brown

unread,
Jul 5, 2012, 11:55:40 PM7/5/12
to puppet...@googlegroups.com
you can put this in the main section of your puppet.conf file

[main]
manifestdir = /home/puppet/manifests

that looks for your site.pp in that directory

you also can specify this in your puppet.conf for each environment.

manifest = /etc/puppet/manifests/site.pp

then in site.pp you do something like this

import 'definitions'
import 'modules'
import 'templates'
import 'nodes'
import 'classes/*'

import looks for .pp files so definitions.pp modules.pp etc

does that help?

The introductory docs cover this sort of thing.
Have a look here. http://docs.puppetlabs.com/learning/
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

jcbollinger

unread,
Jul 6, 2012, 8:49:24 AM7/6/12
to puppet...@googlegroups.com


On Thursday, July 5, 2012 9:57:55 PM UTC-5, Hai wrote:
Hi,

is nodes.pp a default file,like sites.pp, or I have to import it in puppet.conf?

If you use a nodes.pp file then you have to import it manually.  Typically, that takes the form of

import 'nodes.pp'

at the top of your main manifest (normally site.pp).  That is one of very few appropriate uses of the 'import' function, in fact.


John

Reply all
Reply to author
Forward
0 new messages