Puppet Class: st2::profile::client

Inherits:
st2
Defined in:
manifests/profile/client.pp

Summary

Profile to install, configure and manage all client libraries for st2

Overview

Examples:

Basic Usage

include st2::profile::client

Parameters:

  • auth (Any) (defaults to: $st2::auth)

    Is auth enabled or not.

  • api_url (Any) (defaults to: $st2::cli_api_url)

    URL of the StackStorm API service

  • auth_url (Any) (defaults to: $st2::cli_auth_url)

    URL of the StackStorm Auth service

  • base_url (Any) (defaults to: $st2::cli_base_url)

    Base URL for other StackStorm services

  • username (Any) (defaults to: $st2::cli_username)

    Username for auth on the CLI

  • password (Any) (defaults to: $st2::cli_password)

    Password for auth on the CLI

  • api_version (Any) (defaults to: $st2::cli_api_version)

    Version of the StackStorm API

  • cacert (Any) (defaults to: $st2::cli_cacert)

    Path to the SSL CA certficate for the StackStorm services

  • debug (Any) (defaults to: $st2::cli_debug)

    Enable debug mode

  • cache_token (Any) (defaults to: $st2::cli_cache_token)

    Enable cacheing authentication tokens until they expire

  • silence_ssl_warnings (Any) (defaults to: $st2::cli_silence_ssl_warnings)

    Enable silencing SSL warnings for self-signed certs



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'manifests/profile/client.pp', line 29

class st2::profile::client (
  $auth                 = $st2::auth,
  $api_url              = $st2::cli_api_url,
  $auth_url             = $st2::cli_auth_url,
  $base_url             = $st2::cli_base_url,
  $username             = $st2::cli_username,
  $password             = $st2::cli_password,
  $api_version          = $st2::cli_api_version,
  $cacert               = $st2::cli_cacert,
  $debug                = $st2::cli_debug,
  $cache_token          = $st2::cli_cache_token,
  $silence_ssl_warnings = $st2::cli_silence_ssl_warnings,
) inherits st2 {

  # Setup st2client settings for Root user by default
  st2::client::settings { 'root':
    homedir              => '/root',
    auth                 => $auth,
    api_url              => $api_url,
    auth_url             => $auth_url,
    base_url             => $base_url,
    username             => $username,
    password             => $password,
    api_version          => $api_version,
    cacert               => $cacert,
    debug                => $debug,
    cache_token          => $cache_token,
    silence_ssl_warnings => $silence_ssl_warnings,
  }

  # Setup global environment variables:
  file { '/etc/profile.d/st2.sh':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0755',
    content => template('st2/etc/profile.d/st2.sh.erb'),
  }
}