summaryrefslogtreecommitdiff
path: root/README.md
blob: 8c277c18a40a802baefd497c6d17b833aa983b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# trocla

[![Build Status](https://travis-ci.org/duritong/puppet-trocla.png)](https://travis-ci.org/duritong/puppet-trocla)

This is the puppet module to manage a trocla installation on the puppet
master. It also, provides the necessary function to query trocla from puppet.

To get a quick start you might be interested in using the `trocla::yaml` class
on your master. This will install trocla and setup it using the default YAML
storage backend for your master. There is no need to configure anything on the
clients if you do not want to use trocla on the clients itself.

If you want to do your own very custom setup, you should look into the other
classes.

## Compatibility

* Version 0.2.2 of this module is for version 0.2.2 of trocla.

## Functions

### trocla


Usage:

    trocla(KEY, FORMAT, [optional options])

This is the main function you will use. This is similar to a

    trocla create foo FORMAT

on the cli. This means, that *if* a password for this key and format
exists, it will return this one, otherwise will create one automatically
and return the generated password. So you might want to do something like:

    user{'foobar':
      password => trocla('user_foobar','plain')
    }

If you want to pass down encrypted passwords, you might use:


    user{'foobar':
      password => trocla('user_foobar','sha512crypt')
    }

As descriped further in trocla's docs.

The optional options, can be used to pass options to the format, like
overriding the default length for passwords that are being created:

    user{'foobar':
      password => trocla('user_foobar','sha512crypt','length: 32')
    }

### trocla_get

Usage:

    trocla_get(KEY, FORMAT)

This will return the value of the passed key and format. If nothing is
found an error will be raised. This is interesting if you want do not
want to autogenerate a password and rather be sure that it's already
existing in trocla's database.

### trocla_set

Usage:

    trocla_set(KEY, FORMAT,PASSWORD)

This will set the passed password for the key/format pair and return it
as well. This is mainly interesting if you want to migrate existing manifests
with plenty of passwords in it to trocla.

## Other classes

### trocla::config

This is a class that manages a trocla configuration. You might use this
one if you do not use the default yaml setup.

### trocla::master

This class manages the installation of trocla itself. It will not configure
trocla, it will just install the necessary packages.

## Hiera backend

Trocla can also be integrated into [Hiera](https://docs.puppetlabs.com/hiera/) by using ZeroPointEnergy's [hiera-backend](https://github.com/ZeroPointEnergy/hiera-backend-trocla).

Simply `include trocla::master::hiera` to make that backend available.

## Moar

RTFC and for more information about trocla visit: https://github.com/duritong/trocla