From c9a2908ca129f7c71f6852b461ce27ff92d18914 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Sun, 24 Mar 2024 23:49:18 +0100 Subject: [PATCH 1/6] add documentation stumps --- REFERENCE.md | 2 +- manifests/install/bundle.pp | 6 +++++- manifests/install/gem.pp | 7 ++++++- manifests/mcollective.pp | 9 ++++++++- manifests/mcollective/application.pp | 10 +++++++++- manifests/postrun_command.pp | 6 +++++- manifests/prerun_command.pp | 6 +++++- 7 files changed, 39 insertions(+), 7 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 4d2bc958..c2202278 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -368,7 +368,7 @@ Data type: `Any` Data type: `Any` - +R10k gem version ### `r10k::install::puppet_gem` diff --git a/manifests/install/bundle.pp b/manifests/install/bundle.pp index 59a5895f..2e56270e 100644 --- a/manifests/install/bundle.pp +++ b/manifests/install/bundle.pp @@ -1,4 +1,8 @@ -# This class installs the r10k bundle +# @summary This class installs the r10k bundle +# +# @param revision +# @param source +# class r10k::install::bundle ( $revision = 'master', $source = 'https://github.com/adrienthebo/r10k.git', diff --git a/manifests/install/gem.pp b/manifests/install/gem.pp index 6c5d0d38..6b97e589 100644 --- a/manifests/install/gem.pp +++ b/manifests/install/gem.pp @@ -1,4 +1,9 @@ -# Install the r10k gem using system ruby +# @summary Install the r10k gem using system ruby +# +# @param manage_ruby_dependency +# @param version +# R10k gem version +# class r10k::install::gem ( $manage_ruby_dependency, $version, diff --git a/manifests/mcollective.pp b/manifests/mcollective.pp index e997a2d8..b59d8509 100644 --- a/manifests/mcollective.pp +++ b/manifests/mcollective.pp @@ -1,4 +1,11 @@ -# Install the r10k mcollective agent +# @summary Install the r10k mcollective agent +# +# @param ensure +# @param server +# @param client +# @param http_proxy +# @param policies +# class r10k::mcollective ( $ensure = 'present', $server = true, diff --git a/manifests/mcollective/application.pp b/manifests/mcollective/application.pp index 3521bc7e..2b126294 100644 --- a/manifests/mcollective/application.pp +++ b/manifests/mcollective/application.pp @@ -1,4 +1,12 @@ -# Install the r10k mcollective application to a client +# @summary Install the r10k mcollective application to a client +# +# @param agent_name +# @param app_name +# @param agent_ddl +# @param agent_path +# @param app_path +# @param mc_service +# class r10k::mcollective::application ( $agent_name = $r10k::params::mc_agent_name, $app_name = $r10k::params::mc_app_name, diff --git a/manifests/postrun_command.pp b/manifests/postrun_command.pp index bab282cc..51f80dc4 100644 --- a/manifests/postrun_command.pp +++ b/manifests/postrun_command.pp @@ -1,4 +1,8 @@ -# This class will configure r10k to run as part of the masters agent run +# @summary This class will configure r10k to run as part of the masters agent run +# +# @param command +# @param ensure +# class r10k::postrun_command ( $command = $r10k::params::pre_postrun_command, Enum['present', 'absent'] $ensure = 'present', diff --git a/manifests/prerun_command.pp b/manifests/prerun_command.pp index 20ae4d2d..c7c14ca3 100644 --- a/manifests/prerun_command.pp +++ b/manifests/prerun_command.pp @@ -1,4 +1,8 @@ -# This class will configure r10k to run as part of the masters agent run +# @summary This class will configure r10k to run as part of the masters agent run +# +# @param command +# @param ensure +# class r10k::prerun_command ( $command = $r10k::params::pre_postrun_command, Enum['present', 'absent'] $ensure = 'present', From 07b90b211a0d4a3879b01398bf43f0c8cce0785c Mon Sep 17 00:00:00 2001 From: markuszilch Date: Sun, 24 Mar 2024 23:56:47 +0100 Subject: [PATCH 2/6] add doc stubs to types --- REFERENCE.md | 20 ++++++++++---------- types/webhook/config.pp | 1 + types/webhook/config/chatops.pp | 1 + types/webhook/config/r10k.pp | 1 + types/webhook/config/server.pp | 1 + types/webhook/config/server/tls.pp | 1 + 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index c2202278..06dd5528 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -29,11 +29,11 @@ ### Data types -* [`R10k::Webhook::Config`](#R10k--Webhook--Config) -* [`R10k::Webhook::Config::Chatops`](#R10k--Webhook--Config--Chatops) -* [`R10k::Webhook::Config::R10k`](#R10k--Webhook--Config--R10k) -* [`R10k::Webhook::Config::Server`](#R10k--Webhook--Config--Server) -* [`R10k::Webhook::Config::Server::Tls`](#R10k--Webhook--Config--Server--Tls) +* [`R10k::Webhook::Config`](#R10k--Webhook--Config): webhook config type +* [`R10k::Webhook::Config::Chatops`](#R10k--Webhook--Config--Chatops): webhook config chatops type +* [`R10k::Webhook::Config::R10k`](#R10k--Webhook--Config--R10k): webhook config r10k type +* [`R10k::Webhook::Config::Server`](#R10k--Webhook--Config--Server): webhook config server type +* [`R10k::Webhook::Config::Server::Tls`](#R10k--Webhook--Config--Server--Tls): webhook config server tls type ### Tasks @@ -739,7 +739,7 @@ Class: r10k::webhook::service ### `R10k::Webhook::Config` -The R10k::Webhook::Config data type. +webhook config type Alias of @@ -753,7 +753,7 @@ Struct[{ ### `R10k::Webhook::Config::Chatops` -The R10k::Webhook::Config::Chatops data type. +webhook config chatops type Alias of @@ -770,7 +770,7 @@ Struct[{ ### `R10k::Webhook::Config::R10k` -The R10k::Webhook::Config::R10k data type. +webhook config r10k type Alias of @@ -789,7 +789,7 @@ Struct[{ ### `R10k::Webhook::Config::Server` -The R10k::Webhook::Config::Server data type. +webhook config server type Alias of @@ -805,7 +805,7 @@ Struct[{ ### `R10k::Webhook::Config::Server::Tls` -The R10k::Webhook::Config::Server::Tls data type. +webhook config server tls type Alias of diff --git a/types/webhook/config.pp b/types/webhook/config.pp index 9e46860a..216b3828 100644 --- a/types/webhook/config.pp +++ b/types/webhook/config.pp @@ -1,3 +1,4 @@ +# @summary webhook config type type R10k::Webhook::Config = Struct[{ server => Optional[R10k::Webhook::Config::Server], chatops => Optional[R10k::Webhook::Config::Chatops], diff --git a/types/webhook/config/chatops.pp b/types/webhook/config/chatops.pp index 5c2e7f92..babb78f2 100644 --- a/types/webhook/config/chatops.pp +++ b/types/webhook/config/chatops.pp @@ -1,3 +1,4 @@ +# @summary webhook config chatops type type R10k::Webhook::Config::Chatops = Struct[{ enabled => Boolean, service => Optional[Enum['slack', 'rocketchat']], diff --git a/types/webhook/config/r10k.pp b/types/webhook/config/r10k.pp index 04ee2689..7102ae83 100644 --- a/types/webhook/config/r10k.pp +++ b/types/webhook/config/r10k.pp @@ -1,3 +1,4 @@ +# @summary webhook config r10k type type R10k::Webhook::Config::R10k = Struct[{ command_path => Optional[Stdlib::Absolutepath], config_path => Optional[Stdlib::Absolutepath], diff --git a/types/webhook/config/server.pp b/types/webhook/config/server.pp index 5297fb40..7e0c3896 100644 --- a/types/webhook/config/server.pp +++ b/types/webhook/config/server.pp @@ -1,3 +1,4 @@ +# @summary webhook config server type type R10k::Webhook::Config::Server = Struct[{ protected => Boolean, user => Optional[String[1]], diff --git a/types/webhook/config/server/tls.pp b/types/webhook/config/server/tls.pp index 054968e8..e36e0f90 100644 --- a/types/webhook/config/server/tls.pp +++ b/types/webhook/config/server/tls.pp @@ -1,3 +1,4 @@ +# @summary webhook config server tls type type R10k::Webhook::Config::Server::Tls = Struct[{ enabled => Boolean, certificate => Optional[Stdlib::Absolutepath], From a3fdc911c3f2a6a898d9bb9e830fde56150c8939 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Mon, 25 Mar 2024 00:07:34 +0100 Subject: [PATCH 3/6] add docstubs to init; activate checks; regenerate reference --- .puppet-lint.rc | 2 - REFERENCE.md | 162 +++++++++++++++++++++++----------------------- manifests/init.pp | 48 +++++++++++--- 3 files changed, 120 insertions(+), 92 deletions(-) diff --git a/.puppet-lint.rc b/.puppet-lint.rc index dd8272c7..02a3e71d 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,3 +1 @@ --fail-on-warnings ---no-parameter_documentation-check ---no-parameter_types-check diff --git a/REFERENCE.md b/REFERENCE.md index 06dd5528..a6cdbfab 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -49,15 +49,6 @@ This class configures r10k The following parameters are available in the `r10k` class: -* [`cachedir`](#-r10k--cachedir) -* [`sources`](#-r10k--sources) -* [`postrun`](#-r10k--postrun) -* [`manage_configfile_symlink`](#-r10k--manage_configfile_symlink) -* [`configfile_symlink`](#-r10k--configfile_symlink) -* [`forge_settings`](#-r10k--forge_settings) -* [`proxy`](#-r10k--proxy) -* [`pool_size`](#-r10k--pool_size) -* [`ensure`](#-r10k--ensure) * [`remote`](#-r10k--remote) * [`configfile`](#-r10k--configfile) * [`version`](#-r10k--version) @@ -79,78 +70,15 @@ The following parameters are available in the `r10k` class: * [`include_prerun_command`](#-r10k--include_prerun_command) * [`include_postrun_command`](#-r10k--include_postrun_command) * [`puppetconf_path`](#-r10k--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'` +* [`cachedir`](#-r10k--cachedir) +* [`sources`](#-r10k--sources) +* [`postrun`](#-r10k--postrun) +* [`manage_configfile_symlink`](#-r10k--manage_configfile_symlink) +* [`configfile_symlink`](#-r10k--configfile_symlink) +* [`forge_settings`](#-r10k--forge_settings) +* [`proxy`](#-r10k--proxy) +* [`pool_size`](#-r10k--pool_size) +* [`ensure`](#-r10k--ensure) ##### `remote` @@ -320,6 +248,78 @@ 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 diff --git a/manifests/init.pp b/manifests/init.pp index 172ddea3..4ec767e4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,14 +1,44 @@ # @summary This class configures r10k # -# @param cachedir Path to a directory to be used by r10k for caching data -# @param sources Hash containing data sources to be used by r10k to create dynamic Puppet environments -# @param postrun Array containing the parts of a system call Example: ['/usr/bin/curl', '-F', 'deploy=done', 'http://my-app.site/endpoint'] -# @param manage_configfile_symlink determine if a symlink to the r10k config file is to be managed -# @param configfile_symlink Location of symlink that points to configfile -# @param forge_settings Hash containing settings for downloading modules from the Puppet Forge -# @param proxy String containing proxy setting for r10k.yaml -# @param pool_size Integer defining how many threads should be spawn while updating modules -# @param ensure if r10k should be installed or purged +# @param remote +# @param configfile +# @param version +# @param puppet_master +# @param modulepath +# @param manage_modulepath +# @param manage_ruby_dependency +# @param r10k_basedir +# @param package_name +# @param provider +# @param gentoo_keywords +# @param install_options +# @param mcollective +# @param git_settings +# @param deploy_settings +# @param root_user +# @param gem_source +# @param root_group +# @param include_prerun_command +# @param include_postrun_command +# @param puppetconf_path +# @param cachedir +# Path to a directory to be used by r10k for caching data +# @param sources +# Hash containing data sources to be used by r10k to create dynamic Puppet environments +# @param postrun +# Array containing the parts of a system call Example: ['/usr/bin/curl', '-F', 'deploy=done', 'http://my-app.site/endpoint'] +# @param manage_configfile_symlink +# determine if a symlink to the r10k config file is to be managed +# @param configfile_symlink +# Location of symlink that points to configfile +# @param forge_settings +# Hash containing settings for downloading modules from the Puppet Forge +# @param proxy +# String containing proxy setting for r10k.yaml +# @param pool_size +# Integer defining how many threads should be spawn while updating modules +# @param ensure +# if r10k should be installed or purged class r10k ( $remote = $r10k::params::remote, Optional[Hash] $sources = undef, From 819db52ff4835dca1e29bd868c24d99e32091500 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Mon, 25 Mar 2024 23:09:10 +0100 Subject: [PATCH 4/6] add datatypes to parameters --- REFERENCE.md | 52 ++++++++++++++-------------- manifests/init.pp | 18 +++++----- manifests/install/bundle.pp | 4 +-- manifests/install/gem.pp | 4 +-- manifests/mcollective.pp | 10 +++--- manifests/mcollective/application.pp | 12 +++---- manifests/postrun_command.pp | 2 +- manifests/prerun_command.pp | 2 +- manifests/webhook.pp | 15 ++++++-- 9 files changed, 65 insertions(+), 54 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index a6cdbfab..0eba9768 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -82,7 +82,7 @@ The following parameters are available in the `r10k` class: ##### `remote` -Data type: `Any` +Data type: `String[1]` @@ -98,7 +98,7 @@ Default value: `'/etc/puppetlabs/r10k/r10k.yaml'` ##### `version` -Data type: `Any` +Data type: `String[1]` @@ -106,7 +106,7 @@ Default value: `$r10k::params::version` ##### `puppet_master` -Data type: `Any` +Data type: `Boolean` @@ -114,7 +114,7 @@ Default value: `$r10k::params::puppet_master` ##### `modulepath` -Data type: `Any` +Data type: `String[1]` @@ -146,7 +146,7 @@ Default value: `$r10k::params::r10k_basedir` ##### `package_name` -Data type: `Any` +Data type: `String[1]` @@ -154,7 +154,7 @@ Default value: `$r10k::params::package_name` ##### `provider` -Data type: `Any` +Data type: `String[1]` @@ -178,7 +178,7 @@ Default value: `[]` ##### `mcollective` -Data type: `Any` +Data type: `Boolean` @@ -202,7 +202,7 @@ Default value: `{ 'generate_types' => true, 'exclude_spec' => true, }` ##### `root_user` -Data type: `Any` +Data type: `String[1]` @@ -218,7 +218,7 @@ Default value: `undef` ##### `root_group` -Data type: `Any` +Data type: `String[1]` @@ -333,7 +333,7 @@ The following parameters are available in the `r10k::install::bundle` class: ##### `revision` -Data type: `Any` +Data type: `String[1]` @@ -341,7 +341,7 @@ Default value: `'master'` ##### `source` -Data type: `Any` +Data type: `String[1]` @@ -360,13 +360,13 @@ The following parameters are available in the `r10k::install::gem` class: ##### `manage_ruby_dependency` -Data type: `Any` +Data type: `String[1]` ##### `version` -Data type: `Any` +Data type: `String[1]` R10k gem version @@ -390,7 +390,7 @@ The following parameters are available in the `r10k::mcollective` class: ##### `ensure` -Data type: `Any` +Data type: `String[1]` @@ -398,7 +398,7 @@ Default value: `'present'` ##### `server` -Data type: `Any` +Data type: `Boolean` @@ -406,7 +406,7 @@ Default value: `true` ##### `client` -Data type: `Any` +Data type: `Boolean` @@ -414,7 +414,7 @@ Default value: `true` ##### `http_proxy` -Data type: `Any` +Data type: `String` @@ -422,7 +422,7 @@ Default value: `''` ##### `policies` -Data type: `Any` +Data type: `Array` @@ -445,7 +445,7 @@ The following parameters are available in the `r10k::mcollective::application` c ##### `agent_name` -Data type: `Any` +Data type: `Optional[String]` @@ -453,7 +453,7 @@ Default value: `$r10k::params::mc_agent_name` ##### `app_name` -Data type: `Any` +Data type: `Optional[String]` @@ -461,7 +461,7 @@ Default value: `$r10k::params::mc_app_name` ##### `agent_ddl` -Data type: `Any` +Data type: `Optional[String]` @@ -469,7 +469,7 @@ Default value: `$r10k::params::mc_agent_ddl_name` ##### `agent_path` -Data type: `Any` +Data type: `Optional[String]` @@ -477,7 +477,7 @@ Default value: `$r10k::params::mc_agent_path` ##### `app_path` -Data type: `Any` +Data type: `Optional[String]` @@ -485,7 +485,7 @@ Default value: `$r10k::params::mc_application_path` ##### `mc_service` -Data type: `Any` +Data type: `Optional[String]` @@ -508,7 +508,7 @@ The following parameters are available in the `r10k::postrun_command` class: ##### `command` -Data type: `Any` +Data type: `String[1]` @@ -535,7 +535,7 @@ The following parameters are available in the `r10k::prerun_command` class: ##### `command` -Data type: `Any` +Data type: `String[1]` diff --git a/manifests/init.pp b/manifests/init.pp index 4ec767e4..c5465086 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, diff --git a/manifests/install/bundle.pp b/manifests/install/bundle.pp index 2e56270e..3918a53d 100644 --- a/manifests/install/bundle.pp +++ b/manifests/install/bundle.pp @@ -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": diff --git a/manifests/install/gem.pp b/manifests/install/gem.pp index 6b97e589..592c2f16 100644 --- a/manifests/install/gem.pp +++ b/manifests/install/gem.pp @@ -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': { diff --git a/manifests/mcollective.pp b/manifests/mcollective.pp index b59d8509..fbe039a7 100644 --- a/manifests/mcollective.pp +++ b/manifests/mcollective.pp @@ -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': diff --git a/manifests/mcollective/application.pp b/manifests/mcollective/application.pp index 2b126294..e0075f21 100644 --- a/manifests/mcollective/application.pp +++ b/manifests/mcollective/application.pp @@ -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 diff --git a/manifests/postrun_command.pp b/manifests/postrun_command.pp index 51f80dc4..fba65c19 100644 --- a/manifests/postrun_command.pp +++ b/manifests/postrun_command.pp @@ -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': diff --git a/manifests/prerun_command.pp b/manifests/prerun_command.pp index c7c14ca3..73f84cd3 100644 --- a/manifests/prerun_command.pp +++ b/manifests/prerun_command.pp @@ -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': diff --git a/manifests/webhook.pp b/manifests/webhook.pp index 55330ab2..902e3dcd 100644 --- a/manifests/webhook.pp +++ b/manifests/webhook.pp @@ -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', From 94905dfb7a883ced0a81198cdd47843ca4ec11c6 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Tue, 26 Mar 2024 07:56:31 +0100 Subject: [PATCH 5/6] protect added checks from modulesync disabling --- .sync.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .sync.yml diff --git a/.sync.yml b/.sync.yml new file mode 100644 index 00000000..249f530e --- /dev/null +++ b/.sync.yml @@ -0,0 +1,4 @@ +.puppet-lint.rc: + enabled_lint_checks: + - parameter_documentation + - parameter_types From 9134890178734f065f1e674289dd59dd1b80ef1f Mon Sep 17 00:00:00 2001 From: markuszilch Date: Tue, 26 Mar 2024 08:17:27 +0100 Subject: [PATCH 6/6] fix allignment of parameters --- manifests/mcollective/application.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/mcollective/application.pp b/manifests/mcollective/application.pp index e0075f21..b9433dda 100644 --- a/manifests/mcollective/application.pp +++ b/manifests/mcollective/application.pp @@ -9,11 +9,11 @@ # class r10k::mcollective::application ( 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, + 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