From a3fdc911c3f2a6a898d9bb9e830fde56150c8939 Mon Sep 17 00:00:00 2001 From: markuszilch Date: Mon, 25 Mar 2024 00:07:34 +0100 Subject: [PATCH] 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,