-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PA-5826) Only read Windows VERSION file during puppet apply
Previously, puppetserver attempted to load the wrong VERSION file when managing `package_version => auto` and compiling catalogs for Windows nodes as can be seen by the new test: Evaluation Error: Error while evaluating a Function Call, Could not find any files from C:\Program Files\Puppet Labs\Puppet\VERSION (file: path/to/init.pp, line: 170, column: 42) This adds a `puppet_runmode` fact. When running as puppet agent, the run mode will be `agent`. When running as puppet apply, it will be `user`. If it's the latter and we're a Windows host, then look for the VERSION file locally. Since the default class parameter is no longer dependent on the agent fact, I regenerated the reference using rake strings:generate:reference
- Loading branch information
1 parent
560c1e8
commit fb1cd29
Showing
4 changed files
with
40 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Facter.add(:puppet_runmode) do | ||
setcode { Puppet.run_mode.name.to_s } | ||
end |
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