Puppet Class: r10k

Inherits:
r10k::params
Defined in:
manifests/init.pp

Overview

This class configures r10k

Parameters:

  • remote (Any) (defaults to: $r10k::params::remote)
  • sources (Any) (defaults to: $r10k::params::sources)
  • cachedir (Any) (defaults to: $r10k::params::r10k_cache_dir)
  • configfile (Any) (defaults to: $r10k::params::r10k_config_file)
  • version (Any) (defaults to: $r10k::params::version)
  • puppet_master (Any) (defaults to: $r10k::params::puppet_master)
  • modulepath (Any) (defaults to: $r10k::params::modulepath)
  • manage_modulepath (Any) (defaults to: $r10k::params::manage_modulepath)
  • manage_ruby_dependency (Enum['include','declare','ignore']) (defaults to: $r10k::params::manage_ruby_dependency)
  • r10k_basedir (Any) (defaults to: $r10k::params::r10k_basedir)
  • package_name (Any) (defaults to: $r10k::params::package_name)
  • provider (Any) (defaults to: $r10k::params::provider)
  • gentoo_keywords (Any) (defaults to: $r10k::params::gentoo_keywords)
  • install_options (Any) (defaults to: $r10k::params::install_options)
  • mcollective (Any) (defaults to: $r10k::params::mcollective)
  • manage_configfile_symlink (Any) (defaults to: $r10k::params::manage_configfile_symlink)
  • configfile_symlink (Any) (defaults to: $r10k::params::configfile_symlink)
  • git_settings (Hash) (defaults to: $r10k::params::git_settings)
  • forge_settings (Hash) (defaults to: $r10k::params::forge_settings)
  • deploy_settings (Hash) (defaults to: $r10k::params::deploy_settings)
  • root_user (Any) (defaults to: $r10k::params::root_user)
  • proxy (Optional[String[1]]) (defaults to: $r10k::params::proxy)
  • pool_size (Optional[Integer[1]]) (defaults to: $r10k::params::pool_size)
  • gem_source (Optional[String[1]]) (defaults to: $r10k::params::gem_source)
  • root_group (Any) (defaults to: $r10k::params::root_group)
  • postrun (Any) (defaults to: undef)
  • include_prerun_command (Boolean) (defaults to: false)
  • include_postrun_command (Boolean) (defaults to: false)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'manifests/init.pp', line 2

class r10k (
  $remote                                                     = $r10k::params::remote,
  $sources                                                    = $r10k::params::sources,
  $cachedir                                                   = $r10k::params::r10k_cache_dir,
  $configfile                                                 = $r10k::params::r10k_config_file,
  $version                                                    = $r10k::params::version,
  $puppet_master                                              = $r10k::params::puppet_master,
  $modulepath                                                 = $r10k::params::modulepath,
  $manage_modulepath                                          = $r10k::params::manage_modulepath,
  Enum['include','declare','ignore'] $manage_ruby_dependency  = $r10k::params::manage_ruby_dependency,
  $r10k_basedir                                               = $r10k::params::r10k_basedir,
  $package_name                                               = $r10k::params::package_name,
  $provider                                                   = $r10k::params::provider,
  $gentoo_keywords                                            = $r10k::params::gentoo_keywords,
  $install_options                                            = $r10k::params::install_options,
  $mcollective                                                = $r10k::params::mcollective,
  $manage_configfile_symlink                                  = $r10k::params::manage_configfile_symlink,
  $configfile_symlink                                         = $r10k::params::configfile_symlink,
  Hash $git_settings                                          = $r10k::params::git_settings,
  Hash $forge_settings                                        = $r10k::params::forge_settings,
  Hash $deploy_settings                                       = $r10k::params::deploy_settings,
  $root_user                                                  = $r10k::params::root_user,
  Optional[String[1]] $proxy                                  = $r10k::params::proxy,
  Optional[Integer[1]] $pool_size                             = $r10k::params::pool_size,
  Optional[String[1]] $gem_source                             = $r10k::params::gem_source,
  $root_group                                                 = $r10k::params::root_group,
  $postrun                                                    = undef,
  Boolean $include_prerun_command                             = false,
  Boolean $include_postrun_command                            = false,
) inherits r10k::params {
  # Check if user is declaring both classes
  # Other classes like r10k::webhook is supported but
  # using both classes makes no sense unless given pe_r10k
  # overrides this modules default config
  if defined(Class['pe_r10k']) {
    fail('This module does not support being declared with pe_r10k')
  }

  if $include_prerun_command {
    include r10k::prerun_command
  }

  if $include_postrun_command {
    include r10k::postrun_command
  }

  class { 'r10k::install':
    install_options        => $install_options,
    keywords               => $gentoo_keywords,
    manage_ruby_dependency => $manage_ruby_dependency,
    package_name           => $package_name,
    provider               => $provider,
    gem_source             => $gem_source,
    version                => $version,
    puppet_master          => $puppet_master,
  }

  class { 'r10k::config':
    cachedir                  => $cachedir,
    configfile                => $configfile,
    sources                   => $sources,
    modulepath                => $modulepath,
    remote                    => $remote,
    manage_modulepath         => $manage_modulepath,
    r10k_basedir              => $r10k_basedir,
    manage_configfile_symlink => $manage_configfile_symlink,
    configfile_symlink        => $configfile_symlink,
    git_settings              => $git_settings,
    forge_settings            => $forge_settings,
    deploy_settings           => $deploy_settings,
    postrun                   => $postrun,
    root_user                 => $root_user,
    root_group                => $root_group,
    proxy                     => $proxy,
    pool_size                 => $pool_size,
  }

  if $mcollective {
    class { 'r10k::mcollective': }
  }
}