Hey all,

I found out why this is happening.

If I specify the nodes.pp file in
/etc/puppet/environments/production/manifests/site.pp

If I run the setup like this in my site.pp file:

# Empty site.pp required (puppet #15106, foreman #1708)
include 'nodes.pp'

The nodes aren't recognized. And I get this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not pa
rse for environment production: *Import loop detected *for
/etc/puppet/environments/produ
ction/manifests/nodes.pp at
/etc/puppet/environments/production/manifests/site.pp:3 on
node puppet.mydomain.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I've found that just removing the file at that location or commenting out
that line got everything working.

Tim






On Sat, Jan 24, 2015 at 6:25 PM, Tim Dunphy <bluethu...@gmail.com> wrote:

> Hey all,
>
>
>  OK, so I just setup a new puppet server using the foreman installer
> package. Which gives you puppet 2.7.2 (I think). So the next thing I did
> was download the puppet labs yum repo (I'm on centos 6.5) and upgrade to
> version 3.3. And updated my config.ru to the new format. So far so good.
>
>
> Then I added site.pp and nodes.pp files to my production environment.
>
>
> From puppet.conf:
>
>
>   environmentpath = $confdir/environments
>
>
> Here's the production directory:
>
>
> [root@puppet puppet]# ls -ld environments/production/manifests
>
> drwxr-xr-x. 2 puppet puppet 4096 Jan 24 17:58
> environments/production/manifests
>
>
> And the site.pp file:
>
>
> [root@puppet puppet]# ls -l environments/production/manifests/site.pp
>
> -rw-r--r--. 1 puppet puppet 75 Jan 24 15:40
> environments/production/manifests/site.pp
>
>
> [root@puppet puppet]# cat environments/production/manifests/site.pp
>
> # Empty site.pp required (puppet #15106, foreman #1708)
>
> include 'nodes.pp'
>
>
> And the nodes.pp file:
>
>
> [root@puppet puppet]# ls -l environments/production/manifests/nodes.pp
>
> -rw-r--r--. 1 puppet puppet 6110 Jan 24 17:34
> environments/production/manifests/nodes.pp
>
>
> [root@puppet puppet]# head environments/production/manifests/nodes.pp
>
> node 'base' {
>
>      include  bash, ca, puppet, nagios, gpg, openssl, xinetd, devtools,
> sysutils, nmap, subversion, epel, remi
>
> }
>
> node 'webserver' inherits 'base' {
>
>      include  apache, php, mysql
>
> }
>
> node 'puppet.mydomain.com'  inherits 'base'  {
>
> }
>
> But when I do puppet runs,  it looks like none of the classes I have
> assigned to the node in nodes.pp are applied to it:
>
>
> [root@puppet puppet]# puppet agent --test
>
> Warning: Sections other than main, master, agent, user are deprecated in
> puppet.conf. Please use the directory environments feature to specify
> environments. (See
> http://docs.puppetlabs.com/puppet/latest/reference/environments.html)
>
>    (at /usr/lib/ruby/site_ruby/1.8/puppet/settings/config_file.rb:82:in
> `unique_sections_in')
>
> Info: Retrieving pluginfacts
>
> Info: Retrieving plugin
>
> Info: Loading facts
>
> Info: Loading facts
>
> Could not retrieve fact='nr_java_found', resolution='<anonymous>':
> undefined method `start_with?' for nil:NilClass
>
> Info: Caching catalog for puppet.mydomain.com
>
> Info: Applying configuration version '1422141851'
>
> Notice: Finished catalog run in 0.26 seconds
>
>
> Normally I should see a bunch of activity in the run indicating the
> changes that puppet is making. How can I get puppet to recognize my
> nodes.pp file and apply the classes I need to the nodes I define?
>
>
> Thanks
>
> Tim
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0en%2BiWCAWZ%2BR96PK86cGhhgaGJ%2BADPNEFSg7q6%3DMoYtXMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to