9 Enum['present', 'absent'] $ensure = present,
11 Optional[String] $owner = undef,
12 Optional[String] $group = undef,
13 Optional[String] $mode = undef,
14 Optional[Boolean] $extract = undef,
15 Optional[String] $extract_path = undef,
16 Optional[String] $creates = undef,
17 Optional[Boolean] $cleanup = undef,
18 Optional[Stdlib::Compat::Absolute_path] $archive_path = undef,
21 include ::archive::params
24 $file_path = "${archive_path}/${name}"
29 if $file_path !~ Stdlib::Compat::Absolute_path {
30 fail("archive::go[${name}]: \$name or \$archive_path must be an absolute path!") # lint:ignore:trailing_comma
33 $go_url = "http://${server}:${port}"
34 $file_url = "${go_url}/${url_path}"
35 $md5_url = "${go_url}/${md5_url_path}"
41 extract_path => $extract_path,
43 checksum => go_md5($username, $password, $name, $md5_url),
44 checksum_type => 'md5',
47 username => $username,
48 password => $password,
51 $file_owner = pick($owner, $archive::params::owner)
52 $file_group = pick($group, $archive::params::group)
53 $file_mode = pick($mode, $archive::params::mode)
59 require => Archive[$file_path],