Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4241

[puppet_agent] Windows upgrades fail because common_appdata is undefined

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • puppet_agent 1.3.2
    • puppet_agent
    • None
    • Hide

      Agent upgrades in an OSS environment should succeed.

      Show
      Agent upgrades in an OSS environment should succeed.
    • Bug Fix
    • Windows updates without PE will no longer due to {{common_appdata}} being undefined.
    • Needs Assessment

    Description

      When trying to use this module on my Windows 10 Pro (1607) node it failed with the following error:

      Running Puppet agent on demand ...
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Info: Caching catalog for foobar.example.com
      Error: Failed to apply catalog: Parameter path failed on File[\Puppetlabs]: File paths must be fully qualified, not '\Puppetlabs' at /etc/puppetlabs/code/environments/testing/modules/puppet_agent/manifests/prepare.pp:42
      

      The problematic code in `prepare.pp`...

        if !defined(File[$::puppet_agent::params::local_puppet_dir]) {
          file { $::puppet_agent::params::local_puppet_dir:
            ensure => directory,
          }
      

      ...depends on the variable `$common_appdata`, which is used in `params.pp`...

            $local_puppet_dir = windows_native_path("${::common_appdata}/Puppetlabs")
            $local_packages_dir = windows_native_path("${local_puppet_dir}/packages")
      

      ...but this variable isn't available on my system(s). I don't know which module should provide this fact, but it's apparently not installed in my environment. Thus I suggest to add this custom fact to this module.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              michael.smith Michael Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support