Skip to content

Comments

Add ability to use http addresses in download_url#51

Open
jcb124 wants to merge 1 commit intovoxpupuli:masterfrom
jcb124:master
Open

Add ability to use http addresses in download_url#51
jcb124 wants to merge 1 commit intovoxpupuli:masterfrom
jcb124:master

Conversation

@jcb124
Copy link

@jcb124 jcb124 commented Aug 24, 2021

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

Modifies the regex used to generate $filename by allowing http and https
addresses.
@ghoneycutt
Copy link
Member

Great work @jcb124 !

Copy link
Member

@ghoneycutt ghoneycutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests that show this working with http and https and failing with an invalid URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download URL has to be https

2 participants