diff options
author | Jan Dittberner <jandd@cacert.org> | 2016-11-05 12:43:35 +0100 |
---|---|---|
committer | Jan Dittberner <jandd@cacert.org> | 2016-11-05 12:44:12 +0100 |
commit | 37bfcf2c85c8da95b1898f5fb750a012e5638416 (patch) | |
tree | c544aa16f33f41e6e9227992d8681422bfaa0520 | |
parent | 271c157aa5727ac278d50e6d1b953ad453f101b7 (diff) | |
download | cacert-puppet-37bfcf2c85c8da95b1898f5fb750a012e5638416.tar.gz cacert-puppet-37bfcf2c85c8da95b1898f5fb750a012e5638416.tar.xz cacert-puppet-37bfcf2c85c8da95b1898f5fb750a012e5638416.zip |
Document the profiles module
-rw-r--r-- | sitemodules/profiles/README.md | 69 | ||||
-rw-r--r-- | sitemodules/profiles/manifests/base.pp | 36 | ||||
-rw-r--r-- | sitemodules/profiles/manifests/init.pp | 19 |
3 files changed, 64 insertions, 60 deletions
diff --git a/sitemodules/profiles/README.md b/sitemodules/profiles/README.md index 25ac564..e1b9b81 100644 --- a/sitemodules/profiles/README.md +++ b/sitemodules/profiles/README.md @@ -4,80 +4,37 @@ 1. [Description](#description) 1. [Setup - The basics of getting started with profiles](#setup) - * [What profiles affects](#what-profiles-affects) - * [Setup requirements](#setup-requirements) * [Beginning with profiles](#beginning-with-profiles) 1. [Usage - Configuration options and additional functionality](#usage) -1. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +1. [Reference](#reference) 1. [Limitations - OS compatibility, etc.](#limitations) -1. [Development - Guide for contributing to the module](#development) ## Description -Start with a one- or two-sentence summary of what the module does and/or what -problem it solves. This is your 30-second elevator pitch for your module. -Consider including OS/Puppet version it works with. - -You can give more descriptive information in a second paragraph. This paragraph -should answer the questions: "What does this module *do*?" and "Why would I use -it?" If your module has a range of functionality (installation, configuration, -management, etc.), this is the time to mention it. +The profiles module defines functionality that is part of node roles. Profiles +should be assigned to nodes by including them in the node's role class. ## Setup -### What profiles 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: - -* A list of 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, -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 profiles -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. +To use a profile you should define its required parameters in hiera data and +include the profile in the node's role class. ## Usage -This section is where you describe how to customize, configure, and do the -fancy stuff with your module here. It's especially helpful if you include usage -examples and code samples for doing things with your module. +Usage is very specific to the particular profile classes. See the class +documentation for the profiles you want to use. ## Reference -Here, include a complete list of your module's classes, types, providers, -facts, along with the parameters for each. Users refer to this section (thus -the name "Reference") to find specific details; most users don't read it per -se. - -## Limitations - -This is where you list OS compatibility, version compatibility, etc. If there -are Known Issues, you might want to include them under their own heading here. +### Classes -## Development +#### Public classes -Since your module is awesome, other users will want to play with it. Let them -know what the ground rules for contributing are. +*[`profiles::base`](#profiles-base): Setup the base functionality for a puppet managed node. -## Release Notes/Contributors/Etc. **Optional** +## Limitations -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. +This module is designed to be used on CAcert infrastructure only. It is not +designed for reuse anywhere else. The CAcert infrastructure is described at https://infradocs.cacert.org/. diff --git a/sitemodules/profiles/manifests/base.pp b/sitemodules/profiles/manifests/base.pp index bd0a428..961cbb8 100644 --- a/sitemodules/profiles/manifests/base.pp +++ b/sitemodules/profiles/manifests/base.pp @@ -1,6 +1,38 @@ +# Class: profiles::base +# ===================== +# +# This class defines the base profile that is valid for all puppet managed +# CAcert hosts and should therefore be included in any host role class in the +# roles module. +# +# Parameters +# ---------- +# +# @param admins a list of admin users for the node +# +# @param users a hash containing user information +# +# Examples +# -------- +# +# @example +# class roles::myhost { +# include profiles::base +# } +# +# Authors +# ------- +# +# Jan Dittberner <jandd@cacert.org> +# +# Copyright +# --------- +# +# Copyright 2016 Jan Dittberner +# class profiles::base ( - $admins = [], - $users = {}, + Array[String] $admins = [], + Hash[String, Data] $users = {}, ) { # ensure admin users for this container $admins.each |String $username| { diff --git a/sitemodules/profiles/manifests/init.pp b/sitemodules/profiles/manifests/init.pp index 49f1f51..d5b6a48 100644 --- a/sitemodules/profiles/manifests/init.pp +++ b/sitemodules/profiles/manifests/init.pp @@ -1,3 +1,18 @@ -class profiles ( -) { +# Class: profiles +# =============== +# +# This is just the empty profiles class. Specific profiles are defined in +# other classes in this module. +# +# Authors +# ------- +# +# Jan Dittberner <jandd@cacert.org> +# +# Copyright +# --------- +# +# Copyright 2016 Jan Dittberner +# +class profiles { } |