puppetlabs/puppet · error
The 'disable_per_environment_manifest' setting is true, but
Error message
The 'disable_per_environment_manifest' setting is true, but the environment located at %{path_to_env} has a manifest setting in its environment.conf of '%{environment_conf}' which does not match the default_manifest setting '%{puppet_conf}'. What it means
Logged by Puppet::Settings::EnvironmentConf when server-wide disable_per_environment_manifest is true but this environment's environment.conf declares a manifest path that, after absolutization, differs from the default_manifest setting. Per-environment manifests are forbidden in this mode, so Puppet falls back to the default manifest and warns that modules expected under the environment's manifest directory will not be available.
Source
Thrown at lib/puppet/settings/environment_conf.rb:74
def manifest
puppet_conf_manifest = Pathname.new(Puppet.settings.value(:default_manifest))
disable_per_environment_manifest = Puppet.settings.value(:disable_per_environment_manifest)
fallback_manifest_directory =
if puppet_conf_manifest.absolute?
puppet_conf_manifest.to_s
else
File.join(@path_to_env, puppet_conf_manifest.to_s)
end
if disable_per_environment_manifest
environment_conf_manifest = absolute(raw_setting(:manifest))
if environment_conf_manifest && fallback_manifest_directory != environment_conf_manifest
# TRANSLATORS 'disable_per_environment_manifest' is a setting and 'environment.conf' is a file name and should not be translated
message = _("The 'disable_per_environment_manifest' setting is true, but the environment located at %{path_to_env} has a manifest setting in its environment.conf of '%{environment_conf}' which does not match the default_manifest setting '%{puppet_conf}'.") %
{ path_to_env: @path_to_env, environment_conf: environment_conf_manifest, puppet_conf: puppet_conf_manifest }
message += ' ' + _("If this environment is expecting to find modules in '%{environment_conf}', they will not be available!") % { environment_conf: environment_conf_manifest }
Puppet.err(message)
end
fallback_manifest_directory.to_s
else
get_setting(:manifest, fallback_manifest_directory) do |manifest|
absolute(manifest)
end
end
end
def environment_timeout
# gen env specific config or use the default value
get_setting(:environment_timeout, Puppet.settings.value(:environment_timeout)) do |ttl|
# munges the string form statically without really needed the settings system, only
# its ability to munge "4s, 3m, 5d, and 'unlimited' into seconds - if already munged into
# numeric form, the TTLSetting handles that.
Puppet::Settings::TTLSetting.munge(ttl, 'environment_timeout')
end
endView on GitHub (pinned to e227c27540)
Solutions
- Remove the `manifest` line from the environment's environment.conf so the default applies
- Or point default_manifest in puppet.conf at the same absolutized path the environment uses
- Or disable disable_per_environment_manifest if per-environment manifests are intentional
- Redeploy the corrected environment so the warning stops and the expected modules resolve
Example fix
# before # puppet.conf: disable_per_environment_manifest = true # environment.conf: manifest = site/main.pp # after — environment.conf with no manifest override modulepath = site:modules:$basemodulepath # (all environments now share the default_manifest)
Defensive patterns
Strategy: validation
Validate before calling
if Puppet.settings.value(:disable_per_environment_manifest)
Dir.glob('/etc/puppetlabs/code/environments/*').each do |env_dir|
conf = File.join(env_dir, 'environment.conf')
next unless File.read(conf) =~ /^\s*manifest\s*=/
warn "#{conf}: manifest setting is ignored while disable_per_environment_manifest is true"
end
end Prevention
- Pick one manifest policy: either pin default_manifest and forbid per-env manifest lines, or allow per-env manifests
- Template environment.conf without a manifest line when hardening is enabled
- Fail CI when deployed environment.conf files conflict with server-level settings
When it happens
Trigger: Loading an environment whose environment.conf contains `manifest = ...` that does not resolve to the same absolute path as default_manifest, while puppet.conf sets disable_per_environment_manifest=true. raw_setting(:manifest) is absolutized against the env path and compared to the fallback directory.
Common situations: Hardening an existing Puppet installation (best practice pins all environments to one manifest) while control-repo environments still carry per-env manifest lines; moving default_manifest without updating environment.confs; boilerplate environment.conf templates that always set manifest.
Related errors
- No suitable tar implementation found
- manifest of environment '#{@environment.name}' appoints dire
- --- #{filename}
- Unable to connect to the server at %{uri}. Detail: %{detail}
- Puppet #{Puppet.version} requires Ruby #{Puppet::OLDEST_RECO
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/cb04615ce6b83cf0.
Report an issue: GitHub.