archive
: Manages archive module's dependencies.archive::staging
: Backwards-compatibility class for staging module
archive::params
: OS specificarchive
settings such as default user and file mode.
archive::artifactory
: Archive wrapper for downloading files from artifactoryarchive::download
: Archive downloader with integrity verificationarchive::go
: download from goarchive::nexus
: define: archive::nexus ====================== archive wrapper for downloading files from Nexus using REST API. Nexus API: https://repository
archive
: Manage archive file download, extraction, and cleanup.
archive::artifactory_checksum
: A function that returns the checksum value of an artifact stored in Artifactoryarchive::artifactory_latest_url
archive::parse_artifactory_url
: A function to parse an Artifactory maven 2 repository URL
archive::assemble_nexus_url
: Assembles a complete nexus URL from the base url and query parametersarchive::go_md5
: Retrieves and returns specific file's md5 from GoCD server md5 checksum file
Manages archive module's dependencies.
include archive
class { 'archive':
seven_zip_name => '7-Zip 9.20 (x64 edition)',
seven_zip_source => 'C:/Windows/Temp/7z920-x64.msi',
seven_zip_provider => 'windows',
}
class { 'archive':
aws_cli_install => true,
}
class { 'archive':
archives => { '/tmp/jta-1.1.jar' => {
'ensure' => 'present',
'source' => 'http://central.maven.org/maven2/javax/transaction/jta/1.1/jta-1.1.jar',
}, }
}
The following parameters are available in the archive
class:
Data type: Optional[String[1]]
7zip package name. This parameter only applies to Windows.
Default value: $archive::params::seven_zip_name
Data type: Optional[Enum['chocolatey','windows','']]
7zip package provider. This parameter only applies to Windows where it defaults to chocolatey
. Can be set to an empty string, (or undef
via hiera), if you don't want this module to manage 7zip.
Default value: $archive::params::seven_zip_provider
Data type: Optional[String[1]]
Alternative package source for 7zip. This parameter only applies to Windows.
Default value: undef
Data type: Boolean
Installs the AWS CLI command needed for downloading from S3 buckets. This parameter is currently not implemented on Windows.
Default value: false
Data type: Boolean
Installs the GSUtil CLI command needed for downloading from GS buckets. This parameter is currently not implemented on Windows.
Default value: false
Data type: Hash
A hash of archive resources this module should create.
Default value: {}
Backwards-compatibility class for staging module
The following parameters are available in the archive::staging
class:
Data type: String
Absolute path of staging directory to create
Default value: $archive::params::path
Data type: String
Username of directory owner
Default value: $archive::params::owner
Data type: String
Group of directory owner
Default value: $archive::params::group
Data type: String
Mode (permissions) on staging directory
Default value: $archive::params::mode
Archive wrapper for downloading files from artifactory
archive::artifactory { '/tmp/logo.png':
url => 'https://repo.jfrog.org/artifactory/distributions/images/Artifactory_120x75.png',
owner => 'root',
group => 'root',
mode => '0644',
}
$dirname = 'gradle-1.0-milestone-4-20110723151213+0300'
$filename = "${dirname}-bin.zip"
archive::artifactory { $filename:
archive_path => '/tmp',
url => "http://repo.jfrog.org/artifactory/distributions/org/gradle/${filename}",
extract => true,
extract_path => '/opt',
creates => "/opt/${dirname}",
cleanup => true,
}
The following parameters are available in the archive::artifactory
defined type:
url
headers
path
ensure
cleanup
extract
archive_path
creates
extract_path
group
mode
owner
password
username
Data type: Stdlib::HTTPUrl
artifactory download URL
Data type: Array
HTTP header(s) to pass to source
Default value: []
Data type: String
absolute path for the download file (or use archive_path and only supply filename)
Default value: $name
Data type: Enum['present', 'absent']
ensure download file present/absent
Default value: 'present'
Data type: Boolean
remove archive after file extraction
Default value: false
Data type: Boolean
whether to extract the files
Default value: false
Data type: Optional[Stdlib::Absolutepath]
parent directory to download archive into
Default value: undef
Data type: Optional[String]
the file created when the archive is extracted
Default value: undef
Data type: Optional[String]
absolute path to extract archive into
Default value: undef
Data type: Optional[String]
file group (see archive params for defaults)
Default value: undef
Data type: Optional[String]
file mode (see archive params for defaults)
Default value: undef
Data type: Optional[String]
file owner (see archive params for defaults)
Default value: undef
Data type: Optional[String]
Password to authenticate with
Default value: undef
Data type: Optional[String]
User to authenticate as
Default value: undef
Archive downloader with integrity verification
archive::download {"apache-tomcat-6.0.26.tar.gz":
ensure => present,
url => "http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz",
}
archive::download {"apache-tomcat-6.0.26.tar.gz":
ensure => present,
digest_string => "f9eafa9bfd620324d1270ae8f09a8c89",
url => "http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz",
}
The following parameters are available in the archive::download
defined type:
url
headers
allow_insecure
checksum
digest_type
ensure
src_target
digest_string
digest_url
proxy_server
user
Data type: String
source
Data type: Array
HTTP (s) to pass to source
Default value: []
Data type: Boolean
Allow self-signed certificate on source?
Default value: false
Data type: Boolean
Should checksum be validated?
Default value: true
Data type: Enum['none', 'md5', 'sha1', 'sha2','sha256', 'sha384', 'sha512']
Digest to use for calculating checksum
Default value: 'md5'
Data type: Enum['present', 'absent']
ensure file present/absent
Default value: 'present'
Data type: Stdlib::Absolutepath
Absolute path to staging location
Default value: '/usr/src'
Data type: Optional[String]
Value expected checksum
Default value: undef
Data type: Optional[String]
URL expected checksum value
Default value: undef
Data type: Optional[String]
FQDN of proxy server
Default value: undef
Data type: Optional[String]
User used to download the archive
Default value: undef
download from go
The following parameters are available in the archive::go
defined type:
server
port
url_path
md5_url_path
username
password
ensure
path
owner
group
mode
extract
extract_path
creates
cleanup
archive_path
Data type: String
Data type: Integer
Data type: String
Data type: String
Data type: String
Data type: String
Data type: Enum['present', 'absent']
Default value: present
Data type: String
Default value: $name
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
archive wrapper for downloading files from Nexus using REST API. Nexus API: https://repository.sonatype.org/nexus-restlet1x-plugin/default/docs/path__artifact_maven_content.html
archive::nexus { '/tmp/jtstand-ui-0.98.jar': url => 'https://oss.sonatype.org', gav => 'org.codehaus.jtstand:jtstand-ui:0.98', repository => 'codehaus-releases', packaging => 'jar', extract => false, }
The following parameters are available in the archive::nexus
defined type:
url
gav
repository
ensure
checksum_type
checksum_verify
packaging
use_nexus3_urls
classifier
extension
username
password
user
owner
group
mode
extract
extract_path
extract_flags
extract_command
creates
cleanup
proxy_server
proxy_type
allow_insecure
temp_dir
Data type: String
Data type: String
Data type: String
Data type: Enum['present', 'absent']
Default value: present
Data type: Enum['none', 'md5', 'sha1', 'sha2','sha256', 'sha384', 'sha512']
Default value: 'md5'
Data type: Boolean
Default value: true
Data type: String
Default value: 'jar'
Data type: Boolean
Default value: false
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[String]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Manage archive file download, extraction, and cleanup.
The following properties are available in the archive
type.
if file/directory exists, will not download/extract archive.
Valid values: present
, absent
whether archive file should be present/absent (default: present)
Default value: present
The following parameters are available in the archive
type.
allow_insecure
checksum
checksum_type
checksum_url
checksum_verify
cleanup
cookie
digest_string
digest_type
digest_url
download_options
extract
extract_command
extract_flags
extract_path
filename
group
headers
password
path
provider
proxy_server
proxy_type
source
target
temp_dir
url
user
username
Valid values: true
, false
, yes
, no
ignore HTTPS certificate errors
Default value: false
Valid values: %r{\b[0-9a-f]{5,128}\b}
, true
, false
, undef
, nil
, ''
archive file checksum (match checksum_type).
Valid values: none
, md5
, sha1
, sha2
, sha256
, sha384
, sha512
archive file checksum type (none|md5|sha1|sha2|sha256|sha384|sha512).
Default value: none
archive file checksum source (instead of specifying checksum)
Valid values: true
, false
whether checksum wil be verified (true|false).
Default value: true
Valid values: true
, false
whether archive file will be removed after extraction (true|false).
Default value: true
archive file download cookie.
Valid values: %r{\b[0-9a-f]{5,128}\b}
archive file checksum (match checksum_type) (this parameter is for camptocamp/archive compatibility).
Valid values: none
, md5
, sha1
, sha2
, sha256
, sha384
, sha512
archive file checksum type (none|md5|sha1|sha2|sha256|sha384|sha512) (this parameter is camptocamp/archive compatibility).
archive file checksum source (instead of specifying checksum) (this parameter is for camptocamp/archive compatibility)
provider download options (affects curl, wget, gs, and only s3 downloads for ruby provider)
Valid values: true
, false
whether archive will be extracted after download (true|false).
Default value: false
custom extraction command ('tar xvf example.tar.gz'), also support sprintf format ('tar xvf %s') which will be processed with the filename: sprintf('tar xvf %s', filename)
custom extraction options, this replaces the default flags. A string such as 'xvf' for a tar file would replace the default xf flag. A hash is useful when custom flags are needed for different platforms. {'tar' => 'xzf', '7z' => 'x -aot'}.
Default value: undef
target folder path to extract archive.
archive file name (derived from path).
extract command group (using this option will configure the archive file permisison to 0644 so the user can read the file).
optional header(s) to pass.
password to download source file.
namevar, archive file fully qualified file path.
The specific backend to use for this archive
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
proxy address to use when accessing source
Valid values: none
, ftp
, http
, https
proxy type (none|ftp|http|https)
archive file source, supports puppet|http|https|ftp|file|s3|gs uri.
target folder path to extract archive. (this parameter is for camptocamp/archive compatibility)
Specify an alternative temporary directory to use for copying files, if unset then the operating system default will be used.
archive file source, supports http|https|ftp|file uri. (for camptocamp/archive compatibility)
extract command user (using this option will configure the archive file permission to 0644 so the user can read the file).
username to download source file.
Type: Ruby 4.x API
A function that returns the checksum value of an artifact stored in Artifactory
archive::artifactory_checksum(Stdlib::HTTPUrl $url, Optional[Enum['sha1','sha256','md5']] $checksum_type)
The archive::artifactory_checksum function.
Returns: String
Returns the checksum.
Data type: Stdlib::HTTPUrl
The URL of the artifact.
Data type: Optional[Enum['sha1','sha256','md5']]
The checksum type. Note the function will raise an error if you ask for sha256 but your artifactory instance doesn't have the sha256 value calculated.
Type: Ruby 4.x API
The archive::artifactory_latest_url function.
The archive::artifactory_latest_url function.
Returns: Any
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]
Data type: Hash
Type: Ruby 4.x API
A function to parse an Artifactory maven 2 repository URL
A function to parse an Artifactory maven 2 repository URL
Returns: Any
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]