diff --git a/README.md b/README.md index 1dc169d..1b4f804 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,32 @@ Usage This can now be used in other modules that need to install applications. All you would need to do is to have a require (as used with puppet-dotnet, by Liam Bennett) e.g. download_file { "Download dotnet 4.0" : - url => 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe', - destination_directory => 'c:\temp' + url => 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe', + destination_directory => 'c:\temp' + } + + exec { 'install-dotnet-4': + command => "c:\\temp\\dotNetFx40_Full_x86_x64.exe /q /norestart", + provider => powershell, + logoutput => true, + unless => "if ((Get-Item -LiteralPath \'${dotnet::params::f_reg_key}\' -ErrorAction SilentlyContinue).GetValue(\'DisplayVersion\')) { exit 0 }", + require => Download_file['Download dotnet 4.0'] + } + +You can use this module and specify a proxy to download the file. It's usage would then be as follows: + + download_file { "Download dotnet 4.0" : + url => 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe', + destination_directory => 'c:\temp', + proxyAddress => 'http://myproxy.com:port', } exec { 'install-dotnet-4': - command => "c:\\temp\\dotNetFx40_Full_x86_x64.exe /q /norestart", - provider => powershell, - logoutput => true, - unless => "if ((Get-Item -LiteralPath \'${dotnet::params::f_reg_key}\' -ErrorAction SilentlyContinue).GetValue(\'DisplayVersion\')) { exit 0 }", - require => Download_file['Download dotnet 4.0'] + command => "c:\\temp\\dotNetFx40_Full_x86_x64.exe /q /norestart", + provider => powershell, + logoutput => true, + unless => "if ((Get-Item -LiteralPath \'${dotnet::params::f_reg_key}\' -ErrorAction SilentlyContinue).GetValue(\'DisplayVersion\')) { exit 0 }", + require => Download_file['Download dotnet 4.0'] } + +The proxy will be used as part of the download using PowerShell. This does not set a system wide proxy