Bug #1615
manifestdir with environments not honored
| Status: | Investigating | Start date: | 09/26/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | plumbing | |||
| Target version: | - | |||
| Affected Puppet version: | 0.24.5 | Branch: | ||
| Keywords: | ||||
| Votes: | 1 |
Description
I had a [staging] environment with manifestdir= in it and manifestdir was not being honored, modulepath was working fine. It ended up always using the default manifestdir.
Changing manifestdir to manifest=/path/to/staging/site.pp it worked fine.
History
Updated by James Turnbull over 3 years ago
- Status changed from Unreviewed to Needs More Information
Can you provide some more information here? Logs, traces, etc?
Updated by Mike McGrath over 3 years ago
Not really, I talked to lak about this in #puppet and we generally agreed that manifestdir should just get deprecated in favor of just using manifest. It should be pretty easy to test though, in your puppet configs just change manifest=/path/to/manifestdir/site.pp to manifestdir=/path/to/manifestdir/ and the environment will always be production.
Updated by Hector Rivas almost 2 years ago
I think that I had the same issue. I want to use multiple environments, but I had a problem, puppet was always looking for the default location /etc/puppet/conf/manifests/site.pp instead of /etc/puppet/conf/data/
My configuration file looked like this:
[test] manifestdir = /etc/puppet/data/test/manifests
[preproduction] manifestdir = /etc/puppet/data/preproduction/manifests
[development] manifestdir = /etc/puppet/data/development/manifests
[production] manifestdir = /etc/puppet/data/production/manifests
[puppetmasterd] environments = test,development,preproduction,production manifest = $manifestdir/site.pp
Well, the problem was the ‘manifest’ entry in puppetmasterd. Puppet will evaluate it globally before evaluate the environments, setting manifest=/etc/puppet/conf/manifests/site.pp for all the environments.
Solution:
You can think that simply comment the line “manifest = $manifestdir/site.pp”, woudl work since it is the default, but not. Neither writing “manifest = $manifestdir/site.pp” in each environmnet stanza works. You must set the full qualified path to the site.pp: manifest = /etc/puppet/conf/data/
Indeed, I think that you can not use vars in the environment stanzas, but I have to confirm it.
You can test the values using these commands in the puppetmaster host:
$ puppetd —environment development —configprint manifest —config /etc/puppet/puppet.conf /etc/puppet/conf/manifests/site.pp $ puppetd —environment development —configprint manifest —config /etc/puppet/puppet.conf /etc/puppet/conf/manifests/site.pp
And after set the manifest in each environment stanza:
$ puppetd —environment development —configprint manifest —config /etc/puppet/puppet.conf /etc/puppet/data/development/site.pp
I read somewhere that manifestdir wil be obsolete in future versions.
Updated by James Turnbull almost 2 years ago
- Status changed from Needs More Information to Investigating
- Assignee set to Markus Roberts
Updated by Joshua Lifton 5 months ago
- Assignee deleted (
Markus Roberts)
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.
Updated by Joshua Lifton 5 months ago
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.