voxpupuli / puppet-winlogbeat

Apache License 2.0
2 stars 30 forks source link

Add ability to use http addresses in download_url #51

Open jcb124 opened 3 years ago

jcb124 commented 3 years ago

Modifies the regex used to generate $filename by allowing http and https addresses. This is a simple fix that doesn't change any logic, but allows the regex to generate the $filename when a http address is used. Previously, using an http address generated the below error:

Error: Could not set 'present' on ensure: Invalid argument @ dir_s_mkdir - C:/Windows/Temp/http: (file: 
/etc/puppetlabs/code/environments/production/modules/winlogbeat/manifests/install.pp, line: 27)
Error: Could not set 'present' on ensure: Invalid argument @ dir_s_mkdir - C:/Windows/Temp/http: (file: 
/etc/puppetlabs/code/environments/production/modules/winlogbeat/manifests/install.pp, line: 27) 
Wrapped exception:
Invalid argument @ dir_s_mkdir - C:/Windows/Temp/http:
Error: /Stage[main]/Winlogbeat::Install/Archive[C:/Windows/Temp/http://repo.claytonkendall.com/beats/winlogbeat-oss-7.10.2- 
windows-x86_64.zip.zip]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: Invalid argument 
@ dir_s_mkdir - C:/Windows/Temp/http: (file: 
/etc/puppetlabs/code/environments/production/modules/winlogbeat/manifests/install.pp, line: 27)

Fixes #40

ghoneycutt commented 3 years ago

Great work @jcb124 !