puppetlabs / puppetlabs-puppet_agent

Module for managing Puppet-Agent
Apache License 2.0
41 stars 192 forks source link

(PA-5826) Only read Windows VERSION file during puppet apply #677

Closed joshcooper closed 10 months ago

joshcooper commented 10 months ago

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.

kenyon commented 10 months ago

Should fix #665.