Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert documentation to Puppet Strings format #519

Merged
merged 14 commits into from
Nov 8, 2023
1,570 changes: 1,570 additions & 0 deletions REFERENCE.md

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Author:: Liam Bennett (mailto:lbennett@opentable.com)
# Copyright:: Copyright (c) 2013 OpenTable Inc
# License:: MIT

# == Class rundeck::config
# @api private
#
# This private class is called from `rundeck` to manage the configuration
# @summary This private class is called from `rundeck` to manage the configuration.
#
class rundeck::config {
assert_private()
Expand Down
116 changes: 52 additions & 64 deletions manifests/config/aclpolicyfile.pp
Original file line number Diff line number Diff line change
@@ -1,73 +1,61 @@
# Author:: Johannes Graf (mailto:graf@synyx.de)
# Copyright:: Copyright (c) 2015 synyx GmbH & Co. KG
# License:: MIT

# == Define rundeck::config::aclpolicyfile
# @summary This define will create a custom acl policy file.
#
# Use this define to create a custom acl policy file
#
# === Parameters
#
# [*acl_policies*]
# An array containing acl policies. See rundeck::params::acl_policies / rundeck::params::api_policies as an example.
#
# [*group*]
# The group permission that rundeck is installed as.
#
# [*owner*]
# The user that rundeck is installed as.
#
# [*properties_dir*]
# The rundeck configuration directory.
#
# === Examples
#
# Create the admin.aclpolicy file:
#
# rundeck::config::aclpolicyfile { 'myPolicyFile':
# acl_policies => [
# {
# 'description' => 'Admin, all access',
# 'context' => {
# 'type' => 'project',
# 'rule' => '.*'
# @example Admin access.
# rundeck::config::aclpolicyfile { 'myPolicyFile':
# acl_policies => [
# {
# 'description' => 'Admin, all access',
# 'context' => {
# 'type' => 'project',
# 'rule' => '.*',
# },
# 'resource_types' => [
# { 'type' => 'resource', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'adhoc', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'job', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'node', 'rules' => [{ 'name' => 'allow','rule' => '*' }] }
# ],
# 'by' => {
# 'group' => ['admin'],
# 'username' => undef,
# }
# },
# 'resource_types' => [
# { 'type' => 'resource', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'adhoc', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'job', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'node', 'rules' => [{ 'name' => 'allow','rule' => '*' }] }
# ],
# 'by' => {
# 'group' => ['admin'],
# 'username' => undef
# {
# 'description' => 'Admin, all access',
# 'context' => {
# 'type' => 'application',
# 'rule' => 'rundeck',
# },
# 'resource_types' => [
# { 'type' => 'resource', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'project', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'storage', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# ],
# 'by' => {
# 'group' => ['admin'],
# 'username' => undef,
# }
# }
# },
# {
# 'description' => 'Admin, all access',
# 'context' => {
# 'type' => 'application',
# 'rule' => 'rundeck'
# },
# 'resource_types' => [
# { 'type' => 'resource', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'project', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# { 'type' => 'storage', 'rules' => [{ 'name' => 'allow','rule' => '*' }] },
# ],
# 'by' => {
# 'group' => ['admin'],
# 'username' => undef
# }
# }
# ],
# }
# ],
# }
#
# @param acl_policies
# An array of hashes containing acl policies. See example.
# @param group
# The group permission that rundeck is installed as.
# @param owner
# The user that rundeck is installed as.
# @param properties_dir
# The rundeck configuration directory.
# @param template_file
# The template used for acl policy. Default is rundeck/aclpolicy.erb
#
define rundeck::config::aclpolicyfile (
Array $acl_policies,
String $group = 'rundeck',
String $owner = 'rundeck',
Array $acl_policies,
String $group = 'rundeck',
String $owner = 'rundeck',
Stdlib::Absolutepath $properties_dir = '/etc/rundeck',
String $template_file = "${module_name}/aclpolicy.erb",
String $template_file = "${module_name}/aclpolicy.erb",
) {
file { "${properties_dir}/${name}.aclpolicy":
owner => $owner,
Expand Down
94 changes: 47 additions & 47 deletions manifests/config/file_keystore.pp
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
# == Define rundeck::config::file_keystore
# @summary This define will create the 'content' and 'meta' components for the key to be stored.
#
# This type will create the 'content' and 'meta' components for the key to
# be stored, and currently supports password-based public keys. Private
# keys are also supported, but not recommended to be privisioned via this mechanism
# without the proper security policies for the private key data in place
# Currently supports password-based public keys.
# Private keys are also supported, but not recommended to be privisioned via this mechanism
# without the proper security policies for the private key data in place.
#
# === Parameters
# @example Basic usage.
# rundeck::config::file_keystore { 'mypassword':
# path => 'myproject/mypassword',
# value => 'secret',
# content_type => 'application/x-rundeck-data-password',
# data_type => 'password',
# }
#
# [*auth_created_username*]
# @param content_type
# MIME type of the content
# @param data_type
# Data type (password, public-key or private-key)
# @param path
# The path of the named key
# @param value
# The actual value (password) of the named key
# @param auth_created_username
# User who created the key
#
# [*auth_modified_username*]
# @param auth_modified_username
# User who last modified the key
#
# [*content_creation_time*]
# @param content_creation_time
# When the key was first created
#
# [*content_mask*]
# @param content_mask
# Content mask (default is 'content')
#
# [*content_size*]
# @param content_modify_time
# When the key was modified
# @param content_size
# Size of the content string in bytes
#
# [*content_type*]
# MIME type of the content
#
# [*data_type*]
# Date type (password, public-key or private-key)
#
# [*file_keystorage_dir*]
# @param file_keystorage_dir
# Base directory for file-based key storage (defaulted to /var/lib/rundeck/var/storage)
#
# [*group*]
# default system group for the Rundeck framework
#
# [*path*]
# The actual value (password) of the named key
#
# [*user*]
# default system user for the Rundeck framework
#
# [*value*]
# The actual value (password) of the named key
# @param group
# Default system group for the Rundeck framework
# @param user
# Default system user for the Rundeck framework
#
define rundeck::config::file_keystore (
Enum['application/x-rundeck-data-password', 'application/pgp-keys', 'application/octet-stream'] $content_type,
Enum[
'application/x-rundeck-data-password',
'application/pgp-keys',
'application/octet-stream'
] $content_type,
Enum['password', 'public', 'private'] $data_type,
String $path,
String $value,
String $auth_created_username = $rundeck::framework_config['framework.ssh.user'],
String $auth_modified_username = $rundeck::framework_config['framework.ssh.user'],
String $content_creation_time = chomp(generate('/bin/date', '+%Y-%m-%dT%H:%M:%SZ')),
String $content_mask = 'content',
String $content_modify_time = chomp(generate('/bin/date', '+%Y-%m-%dT%H:%M:%SZ')),
Optional[Integer] $content_size = undef,
Stdlib::Absolutepath $file_keystorage_dir = $rundeck::file_keystorage_dir,
String $group = $rundeck::config::group,
String $user = $rundeck::config::user,
String $path,
String $value,
String $auth_created_username = $rundeck::framework_config['framework.ssh.user'],
String $auth_modified_username = $rundeck::framework_config['framework.ssh.user'],
String $content_creation_time = chomp(generate('/bin/date', '+%Y-%m-%dT%H:%M:%SZ')),
String $content_mask = 'content',
String $content_modify_time = chomp(generate('/bin/date', '+%Y-%m-%dT%H:%M:%SZ')),
Optional[Integer] $content_size = undef,
Stdlib::Absolutepath $file_keystorage_dir = $rundeck::file_keystorage_dir,
String $group = $rundeck::config::group,
String $user = $rundeck::config::user,
) {
ensure_resource('file', [$file_keystorage_dir], { 'ensure' => 'directory' })

Expand Down
40 changes: 2 additions & 38 deletions manifests/config/global/file_keystore.pp
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
# == Class rundeck::config::global::file_keystore
# @api private
#
# This private class is called from rundeck::config, used to manage the keys of
# the Rundeck key storage facility if a file-based backend is used
#
# === Parameters
#
# [*keys*]
# A hash of key data values, with a minimum of the following properties:
# * *$value*: the actual value of the key, either the plaintext password string for passwords, or the encrypted public/priviate key
# * *$path*: a string representing the relative path of the key to the 'keys' directory
# * *$data_type*: the data type of the key, one of 'password', 'public-key' or 'private-key'
# * *$content_type*: MIME type of the content, either 'application/x-rundeck-data-password', 'application/pgp-keys' (for public keys)
#
# [*path*]
# The Rundeck OS user group
#
# [*user*]
# The Rundeck OS user
#
# Example:
# ```
# {
# $key1 => {
# $value => 'secret',
# $path => 'myproject/passwords',
# $data_type => 'password',
# $content_type => 'application/x-rundeck-data-password', },
# $key2 => {
# $value => 'ssh-rsa Th1sIsn0tRe@alLyAnRSAk3y',
# $path => 'myproject/pubkeys',
# $data_type => 'public',
# $content_type => 'application/pgp-keys', },
# }
# ```
#
#
# [*file_keystorage_dir*]
# The default base directory for file-based key storage
# @summary This private class is used to manage the keys of the Rundeck key storage facility if a file-based backend is used.
#
class rundeck::config::global::file_keystore {
assert_private()
Expand Down
8 changes: 2 additions & 6 deletions manifests/config/global/framework.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Author:: Liam Bennett (mailto:lbennett@opentable.com)
# Copyright:: Copyright (c) 2013 OpenTable Inc
# License:: MIT

# == Class rundeck::config::global::framework
# @api private
#
# This private class is called from rundeck::config used to manage the framework properties of rundeck
# @summary This private class is called from rundeck::config used to manage the framework properties of rundeck.
#
class rundeck::config::global::framework {
$group = $rundeck::config::group
Expand Down
8 changes: 2 additions & 6 deletions manifests/config/global/project.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Author:: Liam Bennett (mailto:lbennett@opentable.com)
# Copyright:: Copyright (c) 2013 OpenTable Inc
# License:: MIT

# == Class rundeck::config::global::project
# @api private
#
# This private class is called from rundeck::config used to manage the default project properties
# @summary This private class is called from rundeck::config used to manage the default project properties.
#
class rundeck::config::global::project {
assert_private()
Expand Down
8 changes: 2 additions & 6 deletions manifests/config/global/rundeck_config.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Author:: Liam Bennett (mailto:lbennett@opentable.com)
# Copyright:: Copyright (c) 2013 OpenTable Inc
# License:: MIT

# == Class rundeck::config::global::rundeck_config
# @api private
#
# This private class is called from rundeck::config used to manage the rundeck-config properties
# @summary This private class is called from rundeck::config used to manage the rundeck-config properties.
#
class rundeck::config::global::rundeck_config {
assert_private()
Expand Down
8 changes: 2 additions & 6 deletions manifests/config/global/ssl.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Author:: Liam Bennett (mailto:lbennett@opentable.com)
# Copyright:: Copyright (c) 2013 OpenTable Inc
# License:: MIT

# == Class rundeck::config::global::ssl
# @api private
#
# This private class is called from rundeck::config used to manage the ssl properties if ssl is enabled
# @summary This private class is called from rundeck::config used to manage the ssl properties if ssl is enabled.
#
class rundeck::config::global::ssl {
assert_private()
Expand Down
34 changes: 12 additions & 22 deletions manifests/config/global/web.pp
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
# Author:: Wil Cooley <wcooley(at)nakedape.cc>
# License:: MIT
# @summary This class will manage the application's web.xml.
#
# == Class: rundeck::config::global::web
#
# Manage the application's +web.xml+.
#
# Currently only manages the +<security-role>+ required for any user to login and session timout:
# Currently only manages the <security-role> required for any user to login and session timout:
# http://rundeck.org/docs/administration/authenticating-users.html#security-role
# http://rundeck.org/docs/administration/configuration-file-reference.html#session-timeout
#
# === Parameters
#
# [*security_role*]
# @param security_role
# Name of role that is required for all users to be allowed access.
#
# [*session_timeout*]
# @param session_timeout
# Session timeout is an expired time limit for a logged in Rundeck GUI user which as been inactive for a period of time.
#
# [*security_roles_array_enabled*]
# Boolen value if you want to have more roles in web.xml
#
# [*security_roles_array*]
# Array value if you set the value 'security_roles_array_enabled' to true.
# @param security_roles_array_enabled
# Boolen value if you want to have more roles in web.xml
# @param security_roles_array
# Array value if you set the value 'security_roles_array_enabled' to true.
#
class rundeck::config::global::web (
String[1] $security_role = $rundeck::params::security_role,
Integer[0] $session_timeout = $rundeck::params::session_timeout,
Boolean $security_roles_array_enabled = $rundeck::params::security_roles_array_enabled,
Array $security_roles_array = $rundeck::params::security_roles_array,
String[1] $security_role = $rundeck::params::security_role,
Integer[0] $session_timeout = $rundeck::params::session_timeout,
Boolean $security_roles_array_enabled = $rundeck::params::security_roles_array_enabled,
Array $security_roles_array = $rundeck::params::security_roles_array,
) inherits rundeck::params {
if $security_roles_array_enabled {
rundeck::config::securityroles { $security_roles_array: }
Expand Down
Loading