Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert A. Vincent II (Bob-Vee) committed Apr 25, 2022
1 parent 9595bdd commit a2c50e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,16 @@ archive { '/tmp/staging/master.zip':
* `ensure`: whether archive file should be present/absent (default: present)
* `path`: namevar, archive file fully qualified file path.
* `filename`: archive file name (derived from path).
* `source`: archive file source, supports http|https|ftp|file|s3|gs uri.
* `source`: archive file source, supports puppet|http|https|ftp|file|s3|gs uri.
* `username`: username to download source file.
* `password`: password to download source file.
* `allow_insecure`: Ignore HTTPS certificate errors (true|false). (default: false)
* `cookie`: archive file download cookie.
* `checksum_type`: archive file checksum type (none|md5|sha1|sha2|sha256|sha384|
sha512). (default: none)
* `checksum`: archive file checksum (match checksum_type)
* `checksum_url`: archive file checksum source (instead of specify checksum)
* `checksum_url`: archive file checksum source (instead of specify checksum).
Supports `file`, `http`, and `https` but not `puppet` urls.
* `checksum_verify`: whether checksum will be verified (true|false). (default: true)
* `extract`: whether archive will be extracted after download (true|false).
(default: false)
Expand Down
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ Default value: `none`

##### <a name="checksum_url"></a>`checksum_url`

archive file checksum source (instead of specifying checksum)
archive file checksum source (instead of specifying checksum). Supports http|https|ftp|file

##### <a name="checksum_verify"></a>`checksum_verify`

Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/type/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ def should_to_s(value)
end

newparam(:checksum_url) do
desc 'archive file checksum source (instead of specifying checksum)'
desc 'archive file checksum source (instead of specifying checksum). Supports http|https|ftp|file'
validate do |value|
unless value =~ URI.regexp(%w[http https ftp file])
raise ArgumentError, "invalid source url: #{value}"
end
end
end
newparam(:digest_url) do
desc 'archive file checksum source (instead of specifying checksum)
Expand Down

0 comments on commit a2c50e8

Please sign in to comment.