Unverified Commit e062cc87 authored by Tim Smith's avatar Tim Smith Committed by GitHub
Browse files

Merge pull request #145 from zeusttu/use-chocolatey_package-for-upgrade

Use chocolatey package for upgrade
parents bc1c2a59 2d171d9a
......@@ -18,6 +18,7 @@ install:
- ps: iex (irm https://omnitruck.chef.io/install.ps1); Install-Project -Project chefdk -channel current
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- ps: '$env:CHEF_LICENSE = "accept"'
- c:\opscode\chefdk\bin\chef.bat exec ruby --version
- ps: secedit /export /cfg $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg
......
......@@ -36,5 +36,11 @@ powershell_script 'Install Chocolatey' do
environment node['chocolatey']['install_vars']
cwd Chef::Config['file_cache_path']
code install_ps1
not_if { chocolatey_installed? && (node['chocolatey']['upgrade'] == false) }
not_if { chocolatey_installed? }
end
chocolatey_package 'chocolatey' do
action :upgrade
version node['chocolatey']['install_vars']['chocolateyVersion']
only_if { node['chocolatey']['upgrade'] }
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment