# agent_specified_environment fact doesn't populate with the environment setting in the [agent] section

XMLWordPrintable

#### Details

• Bug
• Status: Resolved
• Normal
• Resolution: Fixed
• PUP 4.4.0
• None
• Night's Watch
• 2
• NW - 2021-06-30, NW - 2021-07-14
• Bug Fix
• Fix an issue where the `agent_specified_environment` fact would not get populated if the environment was set in the `[agent]` section. The order of priority is as follows: CLI, agent section, main section.

#### Description

Currently, if I want to use the agent_specified_environment fact, I need to set the environment setting in puppet.conf in the [main] section.

If I happen to be hitting this bug: PUP-6048, this isn't possible.

Putting the environment setting in the [agent] section works around PUP-6048, but doesn't allow me to use agent_specified_environment, the fact ends up empty.

#### People

Gabriel Nagy
Erik Hansen