Defined Type: st2::auth_user

Defined in:
manifests/auth_user.pp

Summary

Creates and manages StackStorm application users (flat_file auth only)

Overview

Examples:

Basic usage

st2::auth_user { 'st2admin':
  password => 'neato!',
}

Parameters:

  • name

    Name of the user

  • ensure (Any) (defaults to: present)

    Ensure user exists or not

  • password (Any) (defaults to: undef)

    User’s password



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/auth_user.pp', line 15

define st2::auth_user(
  $ensure   = present,
  $password = undef,
) {
  include st2::auth::flat_file
  $_htpasswd_file = $st2::auth::flat_file::htpasswd_file

  httpauth { $name:
    ensure    => $ensure,
    password  => $password,
    mechanism => 'basic',
    file      => $_htpasswd_file,
    notify    => File[$_htpasswd_file],
  }

  ########################################
  ## Dependencies
  Package<| tag == 'st2::server::packages' |>
  -> Httpauth[$name]
  -> Service<| tag == 'st2::service' |>
}