diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..778c24176cb1df55711efbe956a9f4e5b8259120 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +--- +stages: + - puppet + +puppet-lint: + stage: puppet + image: ananace/puppetlint:latest-checks + script: + - puppet-lint + --no-documentation-check + --no-autoloader_layout-check + --with-filename + --config .puppet-lint.rc + --log-format '%{path}:%{line}:%{check}:%{KIND}:%{message}' + manifests + +puppet-parser: + stage: puppet + image: ananace/puppetlint:latest + script: + - puppet parser validate + --strict_variables + --render-as s + --modulepath="$(pwd)/.." + manifests/ + - "[ -d templates/ ] && find templates/ -type f -name '*.epp' -print0 | + xargs -0r puppet epp validate --render-as s || true" + - metadata-json-lint + --no-strict-license + metadata.json + +ruby: + stage: puppet + image: ruby:alpine + script: + - "[ -d lib/ ] && find lib/ -type f -name '*.rb' -print0 | + xargs -0rn1 sh -c 'printf \"$0: \"; cat $0 | ruby -c 2>&1' || true" + - "[ -d templates/ ] && find templates/ -type f -name '*.erb' -print0 | + xargs -0rn1 sh -c 'printf \"$0: \"; erb -PxT \"-\" \"$0\" | ruby -c 2>&1' || true" + diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 0000000000000000000000000000000000000000..fb37551211af2bfb7e5672f184e770cbec08deaf --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1,2 @@ +--no-80chars-check +--no-class_inherits_from_params_class-check diff --git a/README.md b/README.md index 8b6f3bd3364279aa44ccf7d38e1e834cce18afbf..9f023bf819d8cf6607b998a67adca8ffd330647b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,117 @@ -# puppet-cwsens +# cwsens -Puppet code for configuring servers. \ No newline at end of file +Welcome to your new module. A short overview of the generated parts can be found +in the [PDK documentation][1]. + +The README template below provides a starting point with details about what +information to include in your README. + +## Table of Contents + +1. [Description](#description) +1. [Setup - The basics of getting started with cwsens](#setup) + * [What cwsens affects](#what-cwsens-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with cwsens](#beginning-with-cwsens) +1. [Usage - Configuration options and additional functionality](#usage) +1. [Limitations - OS compatibility, etc.](#limitations) +1. [Development - Guide for contributing to the module](#development) + +## Description + +Briefly tell users why they might want to use your module. Explain what your +module does and what kind of problems users can solve with it. + +This should be a fairly short description helps the user decide if your module +is what they want. + +## Setup + +### What cwsens affects **OPTIONAL** + +If it's obvious what your module touches, you can skip this section. For +example, folks can probably figure out that your mysql_instance module affects +their MySQL instances. + +If there's more that they should know about, though, this is the place to +mention: + +* Files, packages, services, or operations that the module will alter, impact, + or execute. +* Dependencies that your module automatically installs. +* Warnings or other important notices. + +### Setup Requirements **OPTIONAL** + +If your module requires anything extra before setting up (pluginsync enabled, +another module, etc.), mention it here. + +If your most recent release breaks compatibility or requires particular steps +for upgrading, you might want to include an additional "Upgrading" section here. + +### Beginning with cwsens + +The very basic steps needed for a user to get the module up and running. This +can include setup steps, if necessary, or it can be an example of the most basic +use of the module. + +## Usage + +Include usage examples for common use cases in the **Usage** section. Show your +users how to use your module to solve problems, and be sure to include code +examples. Include three to five examples of the most important or common tasks a +user can accomplish with your module. Show users how to accomplish more complex +tasks that involve different types, classes, and functions working in tandem. + +## Reference + +This section is deprecated. Instead, add reference information to your code as +Puppet Strings comments, and then use Strings to generate a REFERENCE.md in your +module. For details on how to add code comments and generate documentation with +Strings, see the [Puppet Strings documentation][2] and [style guide][3]. + +If you aren't ready to use Strings yet, manually create a REFERENCE.md in the +root of your module directory and list out each of your module's classes, +defined types, facts, functions, Puppet tasks, task plans, and resource types +and providers, along with the parameters for each. + +For each element (class, defined type, function, and so on), list: + +* The data type, if applicable. +* A description of what the element does. +* Valid values, if the data type doesn't make it obvious. +* Default value, if any. + +For example: + +``` +### `pet::cat` + +#### Parameters + +##### `meow` + +Enables vocalization in your cat. Valid options: 'string'. + +Default: 'medium-loud'. +``` + +## Limitations + +In the Limitations section, list any incompatibilities, known issues, or other +warnings. + +## Development + +In the Development section, tell other users the ground rules for contributing +to your project and how they should submit their work. + +## Release Notes/Contributors/Etc. **Optional** + +If you aren't using changelog, put your release notes here (though you should +consider using changelog). You can also add any additional sections you feel are +necessary or important to include here. Please use the `##` header. + +[1]: https://puppet.com/docs/pdk/latest/pdk_generating_modules.html +[2]: https://puppet.com/docs/puppet/latest/puppet_strings.html +[3]: https://puppet.com/docs/puppet/latest/puppet_strings_style.html diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000000000000000000000000000000000000..e382d924f16ccb827ec93e764b49eaef59046bcb --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,4 @@ +# == Class: cwsens +class cwsens( +) { +} diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..018292dcad1fdb82931be736058fd425e2147a3f --- /dev/null +++ b/metadata.json @@ -0,0 +1,15 @@ +{ + "name": "liu-cwsens", + "version": "0.0.0", + "author": "LiU", + "summary": "Puppet module for carbon-weather-projects", + "license": "TBD", + "source": "https://gitlab.liu.se/carbon_weather_projects/puppet-cwsens/tree/production", + "project_page": "https://gitlab.liu.se/carbon_weather_projects/puppet-cwsens", + "issues_url": "https://gitlab.liu.se/carbon_weather_projects/puppet-cwsens/issues", + "dependencies": [ + { "name": "puppetlabs-stdlib", "version_requirement": ">= 1.0.0" } + ], + "data_provider": null +} +