Puppet Class: st2::stanley

Defined in:
manifests/stanley.pp

Summary

Installs the default admin user for st2 (stanley).

Overview

Note:

Will install auto-generate SSH keys of none are provided.

Examples:

Basic Usage

include st2::stanley

Custom SSH keys

class { 'st2::stanley':
  ssh_key_type => 'ssh-rsa',
  ssh_public_key => 'AAAAAWESOMEKEY==',
  ssh_private_key => '----- BEGIN RSA PRIVATE KEY -----\nDEADBEEF\n----- END RSA PRIVATE KEY -----',
}

Parameters:

  • username (Any) (defaults to: 'stanley')

    Name of the stanley user

  • ssh_public_key (Any) (defaults to: undef)

    SSH Public Key without leading key-type and end email

  • ssh_key_type (Any) (defaults to: undef)

    Type of SSH Key (ssh-dsa/ssh-rsa)

  • ssh_private_key (Any) (defaults to: undef)

    Private key

  • client (Any) (defaults to: true)

    Allow incoming connections from the defined user

  • server (Any) (defaults to: true)

    Server where connection requests originate (usually st2 server)



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/stanley.pp', line 28

class st2::stanley (
  $username        = 'stanley',
  $ssh_public_key  = undef,
  $ssh_key_type    = undef,
  $ssh_private_key = undef,
  $client          = true,
  $server          = true,
) {
  st2::user { $username:
    client            => $client,
    server            => $server,
    create_sudo_entry => true,
    groups            => 'st2packs',
    ssh_public_key    => $ssh_public_key,
    ssh_key_type      => $ssh_key_type,
    ssh_private_key   => $ssh_private_key,
  }
}