Skip to content

Commit

Permalink
add datatypes to parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
zilchms committed Mar 25, 2024
1 parent a3fdc91 commit 819db52
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 54 deletions.
52 changes: 26 additions & 26 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following parameters are available in the `r10k` class:

##### <a name="-r10k--remote"></a>`remote`

Data type: `Any`
Data type: `String[1]`



Expand All @@ -98,23 +98,23 @@ Default value: `'/etc/puppetlabs/r10k/r10k.yaml'`

##### <a name="-r10k--version"></a>`version`

Data type: `Any`
Data type: `String[1]`



Default value: `$r10k::params::version`

##### <a name="-r10k--puppet_master"></a>`puppet_master`

Data type: `Any`
Data type: `Boolean`



Default value: `$r10k::params::puppet_master`

##### <a name="-r10k--modulepath"></a>`modulepath`

Data type: `Any`
Data type: `String[1]`



Expand Down Expand Up @@ -146,15 +146,15 @@ Default value: `$r10k::params::r10k_basedir`

##### <a name="-r10k--package_name"></a>`package_name`

Data type: `Any`
Data type: `String[1]`



Default value: `$r10k::params::package_name`

##### <a name="-r10k--provider"></a>`provider`

Data type: `Any`
Data type: `String[1]`



Expand All @@ -178,7 +178,7 @@ Default value: `[]`

##### <a name="-r10k--mcollective"></a>`mcollective`

Data type: `Any`
Data type: `Boolean`



Expand All @@ -202,7 +202,7 @@ Default value: `{ 'generate_types' => true, 'exclude_spec' => true, }`

##### <a name="-r10k--root_user"></a>`root_user`

Data type: `Any`
Data type: `String[1]`



Expand All @@ -218,7 +218,7 @@ Default value: `undef`

##### <a name="-r10k--root_group"></a>`root_group`

Data type: `Any`
Data type: `String[1]`



Expand Down Expand Up @@ -333,15 +333,15 @@ The following parameters are available in the `r10k::install::bundle` class:

##### <a name="-r10k--install--bundle--revision"></a>`revision`

Data type: `Any`
Data type: `String[1]`



Default value: `'master'`

##### <a name="-r10k--install--bundle--source"></a>`source`

Data type: `Any`
Data type: `String[1]`



Expand All @@ -360,13 +360,13 @@ The following parameters are available in the `r10k::install::gem` class:

##### <a name="-r10k--install--gem--manage_ruby_dependency"></a>`manage_ruby_dependency`

Data type: `Any`
Data type: `String[1]`



##### <a name="-r10k--install--gem--version"></a>`version`

Data type: `Any`
Data type: `String[1]`

R10k gem version

Expand All @@ -390,39 +390,39 @@ The following parameters are available in the `r10k::mcollective` class:

##### <a name="-r10k--mcollective--ensure"></a>`ensure`

Data type: `Any`
Data type: `String[1]`



Default value: `'present'`

##### <a name="-r10k--mcollective--server"></a>`server`

Data type: `Any`
Data type: `Boolean`



Default value: `true`

##### <a name="-r10k--mcollective--client"></a>`client`

Data type: `Any`
Data type: `Boolean`



Default value: `true`

##### <a name="-r10k--mcollective--http_proxy"></a>`http_proxy`

Data type: `Any`
Data type: `String`



Default value: `''`

##### <a name="-r10k--mcollective--policies"></a>`policies`

Data type: `Any`
Data type: `Array`



Expand All @@ -445,47 +445,47 @@ The following parameters are available in the `r10k::mcollective::application` c

##### <a name="-r10k--mcollective--application--agent_name"></a>`agent_name`

Data type: `Any`
Data type: `Optional[String]`



Default value: `$r10k::params::mc_agent_name`

##### <a name="-r10k--mcollective--application--app_name"></a>`app_name`

Data type: `Any`
Data type: `Optional[String]`



Default value: `$r10k::params::mc_app_name`

##### <a name="-r10k--mcollective--application--agent_ddl"></a>`agent_ddl`

Data type: `Any`
Data type: `Optional[String]`



Default value: `$r10k::params::mc_agent_ddl_name`

##### <a name="-r10k--mcollective--application--agent_path"></a>`agent_path`

Data type: `Any`
Data type: `Optional[String]`



Default value: `$r10k::params::mc_agent_path`

##### <a name="-r10k--mcollective--application--app_path"></a>`app_path`

Data type: `Any`
Data type: `Optional[String]`



Default value: `$r10k::params::mc_application_path`

##### <a name="-r10k--mcollective--application--mc_service"></a>`mc_service`

Data type: `Any`
Data type: `Optional[String]`



Expand All @@ -508,7 +508,7 @@ The following parameters are available in the `r10k::postrun_command` class:

##### <a name="-r10k--postrun_command--command"></a>`command`

Data type: `Any`
Data type: `String[1]`



Expand All @@ -535,7 +535,7 @@ The following parameters are available in the `r10k::prerun_command` class:

##### <a name="-r10k--prerun_command--command"></a>`command`

Data type: `Any`
Data type: `String[1]`



Expand Down
18 changes: 9 additions & 9 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@
# @param ensure
# if r10k should be installed or purged
class r10k (
$remote = $r10k::params::remote,
String[1] $remote = $r10k::params::remote,
Optional[Hash] $sources = undef,
Stdlib::Absolutepath $cachedir = "${facts['puppet_vardir']}/r10k",
Stdlib::Absolutepath $configfile = '/etc/puppetlabs/r10k/r10k.yaml',
$version = $r10k::params::version,
$puppet_master = $r10k::params::puppet_master,
$modulepath = $r10k::params::modulepath,
String[1] $version = $r10k::params::version,
Boolean $puppet_master = $r10k::params::puppet_master,
String[1] $modulepath = $r10k::params::modulepath,
Boolean $manage_modulepath = $r10k::params::manage_modulepath,
Enum['include','declare','ignore'] $manage_ruby_dependency = $r10k::params::manage_ruby_dependency,
Stdlib::Absolutepath $r10k_basedir = $r10k::params::r10k_basedir,
$package_name = $r10k::params::package_name,
$provider = $r10k::params::provider,
String[1] $package_name = $r10k::params::package_name,
String[1] $provider = $r10k::params::provider,
String $gentoo_keywords = '', # lint:ignore:params_empty_string_assignment
Variant[Array,String] $install_options = [],
$mcollective = $r10k::params::mcollective,
Boolean $mcollective = $r10k::params::mcollective,
Boolean $manage_configfile_symlink = false,
Stdlib::Absolutepath $configfile_symlink = '/etc/r10k.yaml',
Optional[Hash] $git_settings = undef,
Optional[Hash] $forge_settings = undef,
Hash $deploy_settings = { 'generate_types' => true, 'exclude_spec' => true, },
$root_user = $r10k::params::root_user,
String[1] $root_user = $r10k::params::root_user,
Optional[String[1]] $proxy = undef,
Integer[1] $pool_size = $facts['processors']['count'],
Optional[String[1]] $gem_source = undef,
$root_group = $r10k::params::root_group,
String[1] $root_group = $r10k::params::root_group,
Optional[Array[String[1]]] $postrun = undef,
Boolean $include_prerun_command = false,
Boolean $include_postrun_command = false,
Expand Down
4 changes: 2 additions & 2 deletions manifests/install/bundle.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# @param source
#
class r10k::install::bundle (
$revision = 'master',
$source = 'https://github.com/adrienthebo/r10k.git',
String[1] $revision = 'master',
String[1] $source = 'https://github.com/adrienthebo/r10k.git',
) {
# The bundle install has prefix support as of writing this, I want bleeding edge.
package { "${module_name}-bundle":
Expand Down
4 changes: 2 additions & 2 deletions manifests/install/gem.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# R10k gem version
#
class r10k::install::gem (
$manage_ruby_dependency,
$version,
String[1] $manage_ruby_dependency,
String[1] $version,
) {
case $manage_ruby_dependency {
'include': {
Expand Down
10 changes: 5 additions & 5 deletions manifests/mcollective.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# @param policies
#
class r10k::mcollective (
$ensure = 'present',
$server = true,
$client = true,
$http_proxy = '',
$policies = [],
String[1] $ensure = 'present',
Boolean $server = true,
Boolean $client = true,
String $http_proxy = '', # lint:ignore:params_empty_string_assignment
Array $policies = [],
) inherits r10k::params {
include mcollective
mcollective::module_plugin { 'mcollective_agent_r10k':
Expand Down
12 changes: 6 additions & 6 deletions manifests/mcollective/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# @param mc_service
#
class r10k::mcollective::application (
$agent_name = $r10k::params::mc_agent_name,
$app_name = $r10k::params::mc_app_name,
$agent_ddl = $r10k::params::mc_agent_ddl_name,
$agent_path = $r10k::params::mc_agent_path,
$app_path = $r10k::params::mc_application_path,
$mc_service = $r10k::params::mc_service_name,
Optional[String] $agent_name = $r10k::params::mc_agent_name,
Optional[String] $app_name = $r10k::params::mc_app_name,
Optional[String] $agent_ddl = $r10k::params::mc_agent_ddl_name,
Optional[String] $agent_path = $r10k::params::mc_agent_path,
Optional[String] $app_path = $r10k::params::mc_application_path,
Optional[String] $mc_service = $r10k::params::mc_service_name,
) inherits r10k::params {
require r10k

Expand Down
2 changes: 1 addition & 1 deletion manifests/postrun_command.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# @param ensure
#
class r10k::postrun_command (
$command = $r10k::params::pre_postrun_command,
String[1] $command = $r10k::params::pre_postrun_command,
Enum['present', 'absent'] $ensure = 'present',
) inherits r10k::params {
ini_setting { 'r10k_postrun_command':
Expand Down
2 changes: 1 addition & 1 deletion manifests/prerun_command.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# @param ensure
#
class r10k::prerun_command (
$command = $r10k::params::pre_postrun_command,
String[1] $command = $r10k::params::pre_postrun_command,
Enum['present', 'absent'] $ensure = 'present',
) inherits r10k::params {
ini_setting { 'r10k_prerun_command':
Expand Down
15 changes: 13 additions & 2 deletions manifests/webhook.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#
# @summary install and configure the webhook-go package as local webhook receiver to trigger r10k runs
#
# @param install_method how the package should be installed
# @param install_method
# how the package should be installed
# @param ensure
# @param version
# @param service_ensure
# @param service_enabled
# @param config_ensure
# @param config_path
# @param chatops
# @param tls
# @param server
# @param r10k
# @param config
#
class r10k::webhook (
Enum['package', 'repo', 'none'] $install_method = 'package',
Expand Down

0 comments on commit 819db52

Please sign in to comment.