CDIST-TYPE__DOWNLOAD(7) | cdist | CDIST-TYPE__DOWNLOAD(7) |
cdist-type__download - Download a file
By default type will try to use curl, fetch or wget. If download happens in target (see --download) then type will fallback to (and install) wget.
If download happens in local machine, then environment variables like {http,https,ftp}_proxy etc can be used on cdist execution (http_proxy=foo cdist config ...).
To change downloaded file's owner, group or permissions, use require='__download/path/to/file' __file ....
Type tries to detect hash format with regexes, but prefixes cksum:, md5:, sha1: and sha256: are also supported.
Checksum have two purposes - state check and post-download verification. In state check, if destination checksum mismatches, then content of URL will be downloaded to temporary file. If downloaded temporary file's checksum matches, then it will be moved to destination (overwritten).
For local downloads it is expected that usable utilities for checksum calculation exist in the system.
For local downloads it is expected that usable utilities for downloading exist in the system. Type will try to use curl, fetch or wget.
__directory /opt/cpma require='__directory/opt/cpma' \ __download /opt/cpma/cnq3.zip \ --url https://cdn.playmorepromode.com/files/cnq3/cnq3-1.51.zip \ --sum 46da3021ca9eace277115ec9106c5b46 require='__download/opt/cpma/cnq3.zip' \ __unpack /opt/cpma/cnq3.zip \ --backup-destination \ --preserve-archive \ --destination /opt/cpma/server
Ander Punnar <ander-at-kvlt-dot-ee>
Copyright (C) 2021 Ander Punnar. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ungleich GmbH 2021
September 26, 2023 | 7.0.0 |