I'm trying to use windows_zipfile resource from the Chef Supermarket windows cookbook, but the source URL that I am using needs to have user privilege's to fetch any artifacts.
How can we add username and password to windows_zipfile resource?
windows_zipfile 'c:\test_app' do
source 'https://artifactory/repoName/ApplicationName/zipfile.zip'
action :unzip
end
The
windows_zipfilecustom resource does not have any properties to accept credentials for the URL. More importantly the cookbook as a whole is being deprecated in favour of the nativearchive_fileresource.I would recommend downloading the file using remote_file resource by providing the credentials. Then you can use
archive_file(if Chef version > 15), orwindows_zipfileto extract the file from local path.