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

Chocolately not installing through Automated Puppet Runs

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: chocolatey
    • Labels:
      None
    • Template:
    • Team:
      Windows
    • QA Risk Assessment:
      Needs Assessment

      Description

      A customer tried to install Chocolatey using the supported Puppet module and found that it would not install on automated runs however it would on manual runs using puppet agent -t.

      They are using 2017.3.1 master on RHEL 7.3.
      The agent is running Windows Server 2012 R2
      Powershell was version 4.

      They added the code below which made the module start installing through the automated runs:

      # ADDED 
      if ($PSVersionTable.PSVersion.Major -eq 4) { 
      [System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null 
      [System.IO.Compression.ZipFile]::ExtractToDirectory($file, $tempDir) 
      } 
      #ADDED END 
      elseif ($PSVersionTable.PSVersion.Major -lt 5) { 
      $shellApplication = new-object -com shell.application 
      $zipPackage = $shellApplication.NameSpace($file) 
      $destinationFolder = $shellApplication.NameSpace($tempDir) 
      $destinationFolder.CopyHere($zipPackage.Items(),0x10) 
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            danny.mcilhagga Daniel Mcilhagga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support