FAQ
And finally when I add back to puppet.conf my environment, everything is
found correctly:

  [test]
     manifest = $confdir/manifests/non-prod_site.pp
     modulepath =
$confdir/environments/test/modules:$confdir/environments/test/site/modules



[ ~ ]# puppet config print --environment test |grep mani
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')
manifest = /etc/puppet/manifests/non-prod_site.pp
default_manifest = ./manifests
genmanifest = false
manifestdir = /etc/puppet/manifests
disable_per_environment_manifest = false

[ ~ ]# puppet config print --environment test |grep env
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')
environment_timeout = 0
modulepath = /etc/puppet/environments/test/modules:
/etc/puppet/environments/test/site/modules
environment = test
environmentpath = /etc/puppet/environments
disable_per_environment_manifest = false

On Friday, May 8, 2015 at 2:23:27 PM UTC-5, Jim Miller wrote:

Hi all,

Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing
environments is depreciated. I've followed a couple of docs* for how to do
this but seem to be missing something. Nodes can't seem to find modules.
For now it's not a big deal because it's just a warning but I'd like to
address the issue.

*http://docs.puppetlabs.com/puppet/latest/reference/environments.html
(and linked docs)

Here's the old config values in /etc/puppet/puppet.conf for environments:

[main]
....
....
modulepath = /etc/puppet/modules
...
...
...
environment = production
confdir = /etc/puppet

[production]
manifest = $confdir/manifests/site.pp
modulepath =
$confdir/environments/production/modules:$confdir/environments/test/site/modules

[test]
manifest = $confdir/manifests/non-prod_site.pp
modulepath =
$confdir/environments/test/modules:$confdir/environments/test/site/modules

[development]
manifest = $confdir/manifests/non-prod_site.pp
modulepath =
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules



PROPOSED:
[main]
....
....
# modulepath = /etc/puppet/modules
environmentpath = $confdir/environments
default_manifest = /etc/puppet/manifests/site.pp
...
...
...
# environment = production
confdir = /etc/puppet

# [production]
# manifest = $confdir/manifests/site.pp
# modulepath =
$confdir/environments/production/modules:$confdir/environments/test/site/modules

# [test]
# manifest = $confdir/manifests/non-prod_site.pp
# modulepath =
$confdir/environments/test/modules:$confdir/environments/test/site/modules

# [development]
# manifest = $confdir/manifests/non-prod_site.pp
# modulepath =
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules


Environments.conf
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Environments.conf for production:
manifest = $confdir/manifests/site.pp
modulepath =
$confdir/environments/production/modules:$confdir/puppet/environments/production/site

Environments.conf for testing:
manifest = $confdir/manifests/non-prod_site.pp
modulepath =
$confdir/environments/test/modules:$confdir/environments/test/site/modules

Environments.conf for dev:
manifest = $confdir/manifests/non-prod_site.pp
modulepath =
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules


Nodes .pp settings for each environment
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$puppet_env = "production"

$puppet_env = "test"

$puppet_env = "development"


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5efa4de7-d243-4ee9-96d5-4d31e8cff885%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 7 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 8, '15 at 7:23p
activeMay 13, '15 at 5:29p
posts7
users2
websitepuppetlabs.com

2 users in discussion

Jim Miller: 5 posts Ess: 2 posts

People

Translate

site design / logo © 2022 Grokbase