Defined Type: clush::target

Defined in:
modules/clush/manifests/target.pp

Overview

Class: clush::target

Sets up a host to allow ssh from a clush master. Only sets up username & ssh key, expects the key to be available using `secret` from clush/$username.pub

Parameters:

ensure

Should this user / key be present or absent

username

Same as $title, name of user to create

Parameters:

  • ensure (Any) (defaults to: present)
  • username (Any) (defaults to: $title)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'modules/clush/manifests/target.pp', line 14

define clush::target(
    $ensure = present,
    $username = $title,
) {

    user { $username:
        ensure     => $ensure,
        system     => true,
        home       => '/var/lib/clush',
        managehome => true,
        shell      => '/bin/bash',
    }

    ssh::userkey { $username:
        ensure  => $ensure,
        content => secret("clush/${username}.pub"),
        require => User[$username],
    }
}