Skip to content

Latest commit

 

History

History
820 lines (438 loc) · 17.4 KB

REFERENCE.md

File metadata and controls

820 lines (438 loc) · 17.4 KB

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • r10k::config: Set up the root r10k config file (/etc/r10k.yaml).
  • r10k::install: This class is used by the ruby or pe_ruby class

Data types

Tasks

  • deploy: Trigger an r10k deployment.

Classes

r10k

This class configures r10k

Parameters

The following parameters are available in the r10k class:

remote

Data type: String[1]

Default value: $r10k::params::remote

configfile

Data type: Stdlib::Absolutepath

Default value: '/etc/puppetlabs/r10k/r10k.yaml'

version

Data type: String[1]

Default value: $r10k::params::version

puppet_master

Data type: Boolean

Default value: $r10k::params::puppet_master

modulepath

Data type: String[1]

Default value: $r10k::params::modulepath

manage_modulepath

Data type: Boolean

Default value: $r10k::params::manage_modulepath

r10k_basedir

Data type: Stdlib::Absolutepath

Default value: $r10k::params::r10k_basedir

package_name

Data type: String[1]

Default value: $r10k::params::package_name

provider

Data type: String[1]

Default value: $r10k::params::provider

gentoo_keywords

Data type: String

Default value: ''

install_options

Data type: Variant[Array,String]

Default value: []

mcollective

Data type: Boolean

Default value: $r10k::params::mcollective

git_settings

Data type: Optional[Hash]

Default value: undef

deploy_settings

Data type: Hash

Default value: { 'generate_types' => true, 'exclude_spec' => true, }

root_user

Data type: String[1]

Default value: $r10k::params::root_user

gem_source

Data type: Optional[String[1]]

Default value: undef

root_group

Data type: String[1]

Default value: $r10k::params::root_group

include_prerun_command

Data type: Boolean

Default value: false

include_postrun_command

Data type: Boolean

Default value: false

puppetconf_path

Data type: Stdlib::Absolutepath

Default value: $r10k::params::puppetconf_path

cachedir

Data type: Stdlib::Absolutepath

Path to a directory to be used by r10k for caching data

Default value: "${facts['puppet_vardir']}/r10k"

sources

Data type: Optional[Hash]

Hash containing data sources to be used by r10k to create dynamic Puppet environments

Default value: undef

postrun

Data type: Optional[Array[String[1]]]

Array containing the parts of a system call Example: ['/usr/bin/curl', '-F', 'deploy=done', 'http://my-app.site/endpoint']

Default value: undef

manage_configfile_symlink

Data type: Boolean

determine if a symlink to the r10k config file is to be managed

Default value: false

configfile_symlink

Data type: Stdlib::Absolutepath

Location of symlink that points to configfile

Default value: '/etc/r10k.yaml'

forge_settings

Data type: Optional[Hash]

Hash containing settings for downloading modules from the Puppet Forge

Default value: undef

proxy

Data type: Optional[String[1]]

String containing proxy setting for r10k.yaml

Default value: undef

pool_size

Data type: Integer[1]

Integer defining how many threads should be spawn while updating modules

Default value: $facts['processors']['count']

ensure

Data type: Enum['absent','present']

if r10k should be installed or purged

Default value: 'present'

r10k::install::bundle

This class installs the r10k bundle

Parameters

The following parameters are available in the r10k::install::bundle class:

revision

Data type: String[1]

Default value: 'master'

source

Data type: String[1]

Default value: 'https://github.com/adrienthebo/r10k.git'

r10k::install::puppet_gem

This class links the r10k binary for Puppet FOSS 4.2 and up

r10k::mcollective

Install the r10k mcollective agent

Parameters

The following parameters are available in the r10k::mcollective class:

ensure

Data type: String[1]

Default value: 'present'

server

Data type: Boolean

Default value: true

client

Data type: Boolean

Default value: true

http_proxy

Data type: String

Default value: ''

policies

Data type: Array

Default value: []

r10k::mcollective::application

Install the r10k mcollective application to a client

Parameters

The following parameters are available in the r10k::mcollective::application class:

agent_name

Data type: Optional[String]

Default value: $r10k::params::mc_agent_name

app_name

Data type: Optional[String]

Default value: $r10k::params::mc_app_name

agent_ddl

Data type: Optional[String]

Default value: $r10k::params::mc_agent_ddl_name

agent_path

Data type: Optional[String]

Default value: $r10k::params::mc_agent_path

app_path

Data type: Optional[String]

Default value: $r10k::params::mc_application_path

mc_service

Data type: Optional[String]

Default value: $r10k::params::mc_service_name

r10k::params

Reasonable defaults for all classes

r10k::postrun_command

This class will configure r10k to run as part of the masters agent run

Parameters

The following parameters are available in the r10k::postrun_command class:

command

Data type: String[1]

Default value: $r10k::params::pre_postrun_command

ensure

Data type: Enum['present', 'absent']

Default value: 'present'

r10k::prerun_command

This class will configure r10k to run as part of the masters agent run

Parameters

The following parameters are available in the r10k::prerun_command class:

command

Data type: String[1]

Default value: $r10k::params::pre_postrun_command

ensure

Data type: Enum['present', 'absent']

Default value: 'present'

r10k::webhook

install and configure the webhook-go package as local webhook receiver to trigger r10k runs

Parameters

The following parameters are available in the r10k::webhook class:

install_method

Data type: Enum['package', 'repo', 'none']

how the package should be installed

Default value: 'package'

ensure

Data type: Boolean

Default value: false

version

Data type: String

Default value: '2.2.0'

service_ensure

Data type:

Variant[
    Enum['running', 'stopped'],
    Boolean
  ]

Default value: 'running'

service_enabled

Data type: Boolean

Default value: true

config_ensure

Data type: String

Default value: 'file'

config_path

Data type: String

Default value: '/etc/voxpupuli/webhook.yml'

chatops

Data type: R10k::Webhook::Config::ChatOps

Default value:

{
    enabled    => false,
    service    => undef,
    channel    => undef,
    user       => undef,
    auth_token => undef,
    server_uri => undef,
  }
tls

Data type: R10k::Webhook::Config::Server::Tls

Default value:

{
    enabled     => false,
    certificate => undef,
    key         => undef,
  }
server

Data type: R10k::Webhook::Config::Server

Default value:

{
    protected => true,
    user      => 'puppet',
    password  => 'puppet',
    port      => 4000,
    tls       => $tls,
  }
r10k

Data type: R10k::Webhook::Config::R10k

Default value:

{
    command_path    => '/opt/puppetlabs/puppet/bin/r10k',
    config_path     => '/etc/puppetlabs/r10k/r10k.yaml',
    default_branch  => 'production',
    prefix          => undef,
    allow_uppercase => false,
    verbose         => true,
    deploy_modules  => true,
    generate_types  => true,
  }
config

Data type: R10k::Webhook::Config

Default value:

{
    server  => $server,
    chatops => $chatops,
    r10k    => $r10k,
  }

r10k::webhook::config

Class: r10k::webhook::config

r10k::webhook::package

Class: r10k::webhook::package

r10k::webhook::service

Class: r10k::webhook::service

Data types

R10k::Webhook::Config

webhook config type

Alias of

Struct[{
    server  => Optional[R10k::Webhook::Config::Server],
    chatops => Optional[R10k::Webhook::Config::Chatops],
    r10k    => Optional[R10k::Webhook::Config::R10k],
}]

R10k::Webhook::Config::Chatops

webhook config chatops type

Alias of

Struct[{
    enabled    => Boolean,
    service    => Optional[Enum['slack', 'rocketchat']],
    channel    => Optional[String[1]],
    user       => Optional[String[1]],
    auth_token => Optional[String[1]],
    server_uri => Optional[String[1]],
}]

R10k::Webhook::Config::R10k

webhook config r10k type

Alias of

Struct[{
    command_path    => Optional[Stdlib::Absolutepath],
    config_path     => Optional[Stdlib::Absolutepath],
    default_branch  => Optional[String[1]],
    prefix          => Optional[String[1]],
    allow_uppercase => Optional[Boolean],
    verbose         => Optional[Boolean],
    deploy_modules  => Optional[Boolean],
    generate_types  => Optional[Boolean],
}]

R10k::Webhook::Config::Server

webhook config server type

Alias of

Struct[{
    protected => Boolean,
    user      => Optional[String[1]],
    password  => Optional[String[1]],
    port      => Optional[Stdlib::Port],
    tls       => Optional[R10k::Webhook::Config::Server::Tls],
}]

R10k::Webhook::Config::Server::Tls

webhook config server tls type

Alias of

Struct[{
    enabled     => Boolean,
    certificate => Optional[Stdlib::Absolutepath],
    key         => Optional[Stdlib::Absolutepath],
}]

Tasks

deploy

Trigger an r10k deployment.

Supports noop? false

Parameters

environment

Data type: Optional[Pattern[/\A[a-zA-Z0-9_]+\Z/]]

The environment to deploy.

environments

Data type: Optional[Pattern[/\A[a-zA-Z0-9_,]+\Z/]]

A comma separated list of environments to deploy. Takes precedence over environment.

module

Data type: Optional[Pattern[/\A[a-z0-9_]+\Z/]]

A module to deploy across all environments.

modules

Data type: Optional[Pattern[/\A[a-z0-9_,]+\Z/]]

A comma separated list of modules to deploy. Takes precedence over module.