Chef recipe to Download and Install a Windows Certificate
Chef recipe to Download and Install a Windows Certificate (pfx format) to a Windows host:
powershell_script 'download_www_prod' do
code <<-EOH
$S3BucketName="infrastructurebkt"
$Key="certificates/Prod/www.examplesite.gov.au.pfx"
$targetPath="C:/source/www.examplesite.au.pfx"
Read-S3Object -BucketName $S3BucketName -Key $Key -file $targetPath
EOH
creates 'C:/source/www.examplesite.au.pfx'
end
windows_certificate "C:/source/www.examplesite.au.pfx" do
pfx_password "SUPERSECRETPWD"
end