From 1f0e26be661aab3f094fd8314903e7555b4454a1 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 23 May 2024 11:48:08 +0200 Subject: [PATCH] Add types and documentation for all parameters --- .puppet-lint.rc | 2 -- .sync.yml | 5 +++++ REFERENCE.md | 32 ++++++++++++++++---------------- manifests/project.pp | 9 +++++++-- 4 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 .sync.yml diff --git a/.puppet-lint.rc b/.puppet-lint.rc index dd8272c..02a3e71 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/.sync.yml b/.sync.yml new file mode 100644 index 0000000..130aaeb --- /dev/null +++ b/.sync.yml @@ -0,0 +1,5 @@ +--- +.puppet-lint.rc: + enabled_lint_checks: + - parameter_documentation + - parameter_types diff --git a/REFERENCE.md b/REFERENCE.md index 9bd25d3..cac0c66 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -82,16 +82,16 @@ The following parameters are available in the `bolt::project` defined type: * [`project`](#-bolt--project--project) * [`owner`](#-bolt--project--owner) * [`group`](#-bolt--project--group) -* [`manage_user`](#-bolt--project--manage_user) * [`plans`](#-bolt--project--plans) * [`environment`](#-bolt--project--environment) * [`modulepaths`](#-bolt--project--modulepaths) +* [`manage_user`](#-bolt--project--manage_user) ##### `basepath` Data type: `Stdlib::Absolutepath` - +rootdir where the project will be created into Default value: `'/opt/'` @@ -99,7 +99,7 @@ Default value: `'/opt/'` Data type: `String[1]` - +the name of the project Default value: `$name` @@ -107,7 +107,7 @@ Default value: `$name` Data type: `String[1]` - +the user that will own the files and run the service Default value: `$project` @@ -115,23 +115,15 @@ Default value: `$project` Data type: `String[1]` - +the group for all files Default value: `$project` -##### `manage_user` - -Data type: `Boolean` - - - -Default value: `true` - ##### `plans` Data type: `Array[String[1]]` - +a list of all plans we want to run Default value: `[]` @@ -139,7 +131,7 @@ Default value: `[]` Data type: `String[1]` - +the desired code environment we will use Default value: `'peadm'` @@ -147,7 +139,15 @@ Default value: `'peadm'` Data type: `Array[Stdlib::Absolutepath]` - +an array of directories where code lives Default value: `["/etc/puppetlabs/code/environments/${environment}/modules", "/etc/puppetlabs/code/environments/${environment}/site",]` +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + diff --git a/manifests/project.pp b/manifests/project.pp index ef8e444..f2393b4 100644 --- a/manifests/project.pp +++ b/manifests/project.pp @@ -1,8 +1,13 @@ # # @summary creates required files for a bolt project. Will create one oneshot service for each plan # -# @param basepath -# @param project +# @param basepath rootdir where the project will be created into +# @param project the name of the project +# @param owner the user that will own the files and run the service +# @param group the group for all files +# @param plans a list of all plans we want to run +# @param environment the desired code environment we will use +# @param modulepaths an array of directories where code lives # # @author Tim Meusel #