carl kenne
carl kenne

Reputation: 80

Choosing destination when installing a chocolatey packages with Puppet

I have created a chocolatey package that is going to get deployed with Puppet to my test server. The package is basically just a bunch of static resources (CSS/JS) zipped together:

Install-ChocolateyZipPackage 'WebResources' '\\teamcity\WebResources.zip' "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

What would be the best way, using chocolatey, to extract these files to my website folder? It's just at the moment putting everything in the default c:/chocolatey/lib folder.

I've been thinking of 2 ways:

  1. Include a script file that copies the files.
  2. changing the chocolatey env variable to point to my site.

None of them feels right. Any other suggestions?

Upvotes: 1

Views: 584

Answers (1)

ferventcoder
ferventcoder

Reputation: 12561

You are telling the package to install the files to your wherever the script file is running from. This "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" is the destination. If you want to have that change, you should probably put an environment variable on the machine you are targeting and then have it use that if available and default back to this...

Upvotes: 1

Related Questions