Puppet Class: githubreleases

Defined in:
manifests/init.pp

Summary

Downloads release artifacts from Github

Overview

Parameters:

  • release (String) (defaults to: 'latest')

    The release or tag to download

  • asset_filepattern (String) (defaults to: '.*')

    A RegExp filepattern that the requested assed must patch

  • asset_contenttype (String) (defaults to: '.*')

    A RegExp pattern of the requested content type of the asset

  • asset (Boolean) (defaults to: false)

    Request the download of an asset

  • asset_fallback (Boolean) (defaults to: false)

    If asset can’t be found, download a source tar- or zipball instead

  • use_zip (Boolean) (defaults to: false)

    Use a zipball instead of a tarball when requesting non-asset artifacts

  • is_tag (Boolean) (defaults to: false)

    The given release is a tag

  • use_auth (Variant[Boolean, String]) (defaults to: false)

    Authenticate with the GitHub API to circumvent rate limiting

  • use_oauth (Variant[Boolean, String]) (defaults to: false)

    Use OAuth authentication instead of basic authentication.

  • author (Optional[String]) (defaults to: undef)

    Github author of the requested release

  • repository (Optional[String]) (defaults to: undef)

    Github repository of the requested release

  • username (Optional[String]) (defaults to: '')

    GitHub username to use

  • password (Optional[String]) (defaults to: '')

    GitHub password to use



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'manifests/init.pp', line 15

class githubreleases (
  String $release                     = 'latest',
  String $asset_filepattern           = '.*',
  String $asset_contenttype           = '.*',
  Boolean $asset                      = false,
  Boolean $asset_fallback             = false,
  Boolean $use_zip                    = false,
  Boolean $is_tag                     = false,
  Variant[Boolean, String] $use_auth  = false,
  Variant[Boolean, String] $use_oauth = false,
  Optional[String] $author            = undef,
  Optional[String] $repository        = undef,
  Optional[String] $username          = '',
  Optional[String] $password          = ''
)
  {

    $githubreleases_download = lookup('githubreleases_download', { merge => hash, default_value => undef })

    if ($githubreleases_download) {
      create_resources('githubreleases_download', $githubreleases_download)
    }

  }