forked from puppetlabs/puppet
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(puppetlabs#3910) Make puppet agent use environment specified in catalog
If there is an environment specified in the catalog to be applied (i.e. an external node classifier was used and gave an environment for this node) the puppet agent will switch to that environment. When switching environment, the agent needs to get facts and plugins again using the new environment, and then try fetching the catalog again using the new facts, since this may change the catalog. It loops in this process several times, until the environment doesn't change. If it fails to stabilize in a limited number of tries it will raise an error and abort the run. This change also means that the prerun command runs after fetching catalog but before applying. It previously ran before fetching the catalog.
- Loading branch information
Showing
3 changed files
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters