aboutsummaryrefslogtreecommitdiff
path: root/REFERENCE.md
blob: c1384d2af6810570555763707764e6fbde48f9b7 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# Reference

<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

### Classes

#### Public Classes

* [`letsencrypt`](#letsencrypt): Sets up letsencrypt for other classes
* [`letsencrypt::authenticator::nginx`](#letsencrypt--authenticator--nginx): Sets up nginx specific configuration, and provides access to variables for enterpolating into nginx configurations  These use the default cer

#### Private Classes

* `letsencrypt::renew::cron::setup`: Handles renewal certificates through CRON
* `letsencrypt::renew::setup`: Sets up timers for automatically renewing certificates
* `letsencrypt::renew::systemd::setup`: Handles renewal certificates through systemd timers

### Defined types

#### Public Defined types

* [`letsencrypt::cert`](#letsencrypt--cert): A single certificate
* [`letsencrypt::domain`](#letsencrypt--domain): A single domain name which should be part of a certificate

#### Private Defined types

* `letsencrypt::renew`: Configures automatic renewal for the given certificate
* `letsencrypt::renew::systemd`

### Functions

* [`letsencrypt::conf::nginx`](#letsencrypt--conf--nginx): Returns a hash to be merged into a nginx::resource::server resources parameters.
* [`letsencrypt::conf::nginx::location`](#letsencrypt--conf--nginx--location): Returns a hash to be merged into a nginx::resource::location resource.

### Data types

* [`Letsencrypt::Authenticator`](#Letsencrypt--Authenticator): Known authenticator types
* [`Letsencrypt::Renewal_provider`](#Letsencrypt--Renewal_provider): Known backends which can keep track of when to issue renewal requests.
* [`Letsencrypt::Ssl_conf::Nginx`](#Letsencrypt--Ssl_conf--Nginx): SSL configuration hash for nginx
* [`Letsencrypt::Ssl_conf::Nginx::Location`](#Letsencrypt--Ssl_conf--Nginx--Location): SSL configuration for a single nginx location.

## Classes

### <a name="letsencrypt"></a>`letsencrypt`

Sets up letsencrypt for other classes

#### Parameters

The following parameters are available in the `letsencrypt` class:

* [`email`](#-letsencrypt--email)
* [`manage_package`](#-letsencrypt--manage_package)
* [`certbot_package`](#-letsencrypt--certbot_package)
* [`server`](#-letsencrypt--server)
* [`renewal_provider`](#-letsencrypt--renewal_provider)
* [`config`](#-letsencrypt--config)

##### <a name="-letsencrypt--email"></a>`email`

Data type: `String`

Contact email sent to letsencrypt

##### <a name="-letsencrypt--manage_package"></a>`manage_package`

Data type: `Boolean`

Should the certbot package resource be managed by this class

Default value: `true`

##### <a name="-letsencrypt--certbot_package"></a>`certbot_package`

Data type: `String`

Name of the certbot package. Should be automatically set through hiera.

Default value: `'certbot'`

##### <a name="-letsencrypt--server"></a>`server`

Data type: `String`

Server providing ACME challenge

Default value: `'https://acme-v02.api.letsencrypt.org/directory'`

##### <a name="-letsencrypt--renewal_provider"></a>`renewal_provider`

Data type: `Letsencrypt::Renewal_provider`

Service responsible for periodically renewing the certificate

##### <a name="-letsencrypt--config"></a>`config`

Data type: `Hash[String, Any]`

Default configuration values to pass to certbot. $server and
$email is added here if not explicitly set. It's later merged with
a specific instance for each certificate.

Default value: `{}`

### <a name="letsencrypt--authenticator--nginx"></a>`letsencrypt::authenticator::nginx`

Sets up nginx specific configuration, and provides access to
variables for enterpolating into nginx configurations

These use the default cert name

#### Parameters

The following parameters are available in the `letsencrypt::authenticator::nginx` class:

* [`certbot_plugin_package`](#-letsencrypt--authenticator--nginx--certbot_plugin_package)
* [`manage_package`](#-letsencrypt--authenticator--nginx--manage_package)

##### <a name="-letsencrypt--authenticator--nginx--certbot_plugin_package"></a>`certbot_plugin_package`

Data type: `String`

Name of the system package providing this plugin.
Populated through hiera.

##### <a name="-letsencrypt--authenticator--nginx--manage_package"></a>`manage_package`

Data type: `Boolean`

If this class should manage the package.

Default value: `true`

## Defined types

### <a name="letsencrypt--cert"></a>`letsencrypt::cert`

A single certificate

#### Parameters

The following parameters are available in the `letsencrypt::cert` defined type:

* [`cert_name`](#-letsencrypt--cert--cert_name)
* [`ensure`](#-letsencrypt--cert--ensure)
* [`include_self`](#-letsencrypt--cert--include_self)
* [`authenticator`](#-letsencrypt--cert--authenticator)
* [`domains`](#-letsencrypt--cert--domains)
* [`config`](#-letsencrypt--cert--config)

##### <a name="-letsencrypt--cert--cert_name"></a>`cert_name`

Data type: `String`

Name of the certificate, can be anything, but $::fqdn is recommended

Default value: `$name`

##### <a name="-letsencrypt--cert--ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`

Present or absent (currently does nothing)

Default value: `'present'`

##### <a name="-letsencrypt--cert--include_self"></a>`include_self`

Data type: `Boolean`

Should the certificates name be one of its domains?

Default value: `true`

##### <a name="-letsencrypt--cert--authenticator"></a>`authenticator`

Data type: `Letsencrypt::Authenticator`

How should the challenge be handled.

##### <a name="-letsencrypt--cert--domains"></a>`domains`

Data type: `Array[String]`

List of domains to add to certificate

Default value: `[]`

##### <a name="-letsencrypt--cert--config"></a>`config`

Data type: `Hash[String, Any]`

Additional config for this entry

Default value: `{}`

### <a name="letsencrypt--domain"></a>`letsencrypt::domain`

A single domain name which should be part of a certificate

#### Parameters

The following parameters are available in the `letsencrypt::domain` defined type:

* [`cert_name`](#-letsencrypt--domain--cert_name)
* [`domain_name`](#-letsencrypt--domain--domain_name)

##### <a name="-letsencrypt--domain--cert_name"></a>`cert_name`

Data type: `String`

Which certificate this domain name belongs to

##### <a name="-letsencrypt--domain--domain_name"></a>`domain_name`

Data type: `String`

The domain name to be added

Default value: `$name`

## Functions

### <a name="letsencrypt--conf--nginx"></a>`letsencrypt::conf::nginx`

Type: Puppet Language

Returns a hash to be merged into a nginx::resource::server resources
parameters.

#### `letsencrypt::conf::nginx(String $cert_name)`

Returns a hash to be merged into a nginx::resource::server resources
parameters.

Returns: `Letsencrypt::Ssl_conf::Nginx` hash usable with nginx::resource::server

##### `cert_name`

Data type: `String`

name of the domain in question, NOT the local certificate name.

### <a name="letsencrypt--conf--nginx--location"></a>`letsencrypt::conf::nginx::location`

Type: Puppet Language

Returns a hash to be merged into a nginx::resource::location resource.

#### `letsencrypt::conf::nginx::location(String $cert_name)`

Returns a hash to be merged into a nginx::resource::location resource.

Returns: `Letsencrypt::Ssl_conf::Nginx::Location` hash usable with nginx::resource::location

##### `cert_name`

Data type: `String`

Domain for which we want the configuration.
NOT the local certificate name.

## Data types

### <a name="Letsencrypt--Authenticator"></a>`Letsencrypt::Authenticator`

Known authenticator types

Alias of `Enum['nginx']`

### <a name="Letsencrypt--Renewal_provider"></a>`Letsencrypt::Renewal_provider`

Known backends which can keep track of when to issue renewal
requests.

Alias of `Enum['systemd', 'cron']`

### <a name="Letsencrypt--Ssl_conf--Nginx"></a>`Letsencrypt::Ssl_conf::Nginx`

Will either have ssl set to false, or ssl set to true, along with
appropriate ssl parameters.

Alias of

```puppet
Variant[Struct[{
      ssl => Boolean,
  }], Struct[{
      ssl          => Boolean,
      ssl_redirect => Boolean,
      ssl_cert     => String,
      ssl_key      => String,
  }]]
```

### <a name="Letsencrypt--Ssl_conf--Nginx--Location"></a>`Letsencrypt::Ssl_conf::Nginx::Location`

SSL configuration for a single nginx location.

Alias of

```puppet
Variant[Struct[{
      ssl => Boolean,
  }], Struct[{
      ssl      => Boolean,
      ssl_only => Boolean,
  }]]
```