Skip to content

Commit 7dac86d

Browse files
committed
Feat: Allow to download from a login/password protected URL
Signed-off-by: Julien Godin <[email protected]>
1 parent 18cac85 commit 7dac86d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: manifests/download.pp

+14
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
# @param url
2929
# Full URL
3030
#
31+
# @param username
32+
# Username for the URL
33+
#
34+
# @param password
35+
# Password for the URL
36+
#
3137
# @param jce
3238
# Install Oracles Java Cryptographic Extensions into the JRE or JDK
3339
#
@@ -62,8 +68,12 @@
6268
Optional[String] $proxy_server = undef,
6369
Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef,
6470
Optional[String] $url = undef,
71+
Optional[String] $username = undef,
72+
Optional[String] $password = undef,
6573
Boolean $jce = false,
6674
Optional[String] $jce_url = undef,
75+
Optional[String] $jce_username = undef,
76+
Optional[String] $jce_password = undef,
6777
Optional[String] $basedir = undef,
6878
Boolean $manage_basedir = false,
6979
Optional[String] $package_type = undef,
@@ -258,6 +268,8 @@
258268
archive { $destination :
259269
ensure => present,
260270
source => $source,
271+
username => $username,
272+
password => $password,
261273
extract_path => '/tmp',
262274
cleanup => false,
263275
creates => $creates_path,
@@ -309,6 +321,8 @@
309321
extract_path => $jce_path,
310322
extract_flags => '-oj',
311323
creates => "${jce_path}/US_export_policy.jar",
324+
username => $jce_username,
325+
password => $jce_password,
312326
cleanup => false,
313327
proxy_server => $proxy_server,
314328
proxy_type => $proxy_type,

0 commit comments

Comments
 (0)