-
Notifications
You must be signed in to change notification settings - Fork 13
/
metadata.rb
369 lines (323 loc) · 12.3 KB
/
metadata.rb
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# encoding: UTF-8
#
# Cookbook Name:: postfixadmin
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2013-2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name 'postfixadmin'
maintainer 'Xabier de Zuazo'
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description 'Installs and configures PostfixAdmin, a web based interface used '\
'to manage mailboxes, virtual domains and aliases.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.1.0' # WiP
if respond_to?(:source_url)
source_url "https://github.com/zuazo/#{name}-cookbook"
end
if respond_to?(:issues_url)
issues_url "https://github.com/zuazo/#{name}-cookbook/issues"
end
chef_version '>= 12.5' if respond_to?(:chef_version)
supports 'amazon'
supports 'debian'
supports 'centos'
supports 'fedora'
supports 'ubuntu'
depends 'apache2', '~> 3.0'
depends 'ark', '~> 2.2'
depends 'database', '~> 6.0'
depends 'encrypted_attributes', '~> 0.2'
depends 'mysql', '~> 8.0'
depends 'chef_nginx', '~> 5.0'
depends 'compat_resource', '>= 12.5'
depends 'openssl', '~> 6.0'
depends 'php', '~> 2.0'
depends 'php-fpm', '>= 0.7'
depends 'postgresql', '~> 6.0'
depends 'mysql2_chef_gem', '~> 1.0'
depends 'ssl_certificate', '~> 2.0'
depends 'yum-epel', '~> 0.5'
recipe 'postfixadmin::default', 'Installs and configures PostfixAdmin'
recipe 'postfixadmin::map_files',
'Installs PostfixAdmin SQL map files to be used by Postfix'
recipe 'postfixadmin::mysql',
'Installs MySQL server for PostfixAdmin'
recipe 'postfixadmin::postgresql',
'Installs PostgreSQL server for PostfixAdmin'
provides 'postfixadmin_admin'
provides 'postfixadmin_alias'
provides 'postfixadmin_domain'
provides 'postfixadmin_mailbox'
provides 'postfixadmin_alias_domain'
# Commented until 11.0.10 server release (CHEF-3976)
# provides 'postfixadmin_admin[user]'
# provides 'postfixadmin_alias[address]'
# provides 'postfixadmin_domain[domain]'
# provides 'postfixadmin_mailbox[mailbox]'
# provides 'postfixadmin_alias_domain[alias_domain]'
attribute 'postfixadmin/version',
display_name: 'postfixadmin version',
description: 'PostfixAdmin version',
type: 'string',
required: 'optional',
default: '3.0.2'
attribute 'postfixadmin/url',
display_name: 'postfixadmin URL',
description: 'PostfixAdmin download URL',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/checksum',
display_name: 'postfixadmin checksum',
description: 'PostfixAdmin download file checksum',
type: 'string',
required: 'optional',
default:
'761074e711ab618deda425dc013133b9d5968e0859bb883f10164061fd87006e'
attribute 'postfixadmin/port',
display_name: 'postfixadmin port',
description: 'PostfixAdmin listen port',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/server_name',
display_name: 'server name',
description: 'PostfixAdmin server name',
calculated: true,
type: 'string',
required: 'recommended'
attribute 'postfixadmin/server_aliases',
display_name: 'server aliases',
description: 'PostfixAdmin server aliases',
type: 'array',
required: 'optional',
default: []
attribute 'postfixadmin/headers',
display_name: 'postfixadmin headers',
description: 'PostfixAdmin HTTP headers to set as hash',
type: 'hash',
default: {}
attribute 'postfixadmin/ssl',
display_name: 'enable ssl',
description: 'enables HTTPS (with SSL)',
choice: %w(true false),
type: 'string',
required: 'optional',
default: 'false'
attribute 'postfixadmin/encrypt_attributes',
display_name: 'postfixadmin encrypt attributes',
description: 'Whether to encrypt PostfixAdmin attributes containing '\
'credential secrets.',
type: 'string',
choice: %w(true false),
default: 'false'
attribute 'postfixadmin/setup_password',
display_name: 'postfixadmin setup_password',
description: 'PostfixAdmin Setup Password (required for chef-solo)',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/setup_password_salt',
display_name: 'postfixadmin password_salt',
description: 'PostfixAdmin password salt (required for chef-solo)',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/setup_password_encrypted',
display_name: 'postfixadmin password_encrypted',
description: 'PostfixAdmin encrypted Password',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/web_server',
display_name: 'Web Server',
description: 'Web server to use: apache or false',
choice: %w(apache nginx false),
type: 'string',
required: 'optional',
default: 'apache'
attribute 'postfixadmin/database/manage',
display_name: 'database manage',
description: 'Whether to manage database creation.',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/database/type',
display_name: 'database type',
description: 'PostfixAdmin database type',
choice: %w("mysql" "postgresql"),
type: 'string',
required: 'optional',
default: '"mysql"'
attribute 'postfixadmin/database/name',
display_name: 'database name',
description: 'PostfixAdmin database name',
type: 'string',
required: 'optional',
default: '"postfix"'
attribute 'postfixadmin/database/host',
display_name: 'database host',
description: 'PostfixAdmin database hostname or IP address',
type: 'string',
required: 'optional',
default: '"127.0.0.1"'
attribute 'postfixadmin/database/user',
display_name: 'database user',
description: 'PostfixAdmin database login username',
type: 'string',
required: 'optional',
default: '"postfix"'
attribute 'postfixadmin/database/password',
display_name: 'database password',
description:
'PostfixAdmin database login password (required for chef-solo)',
calculated: true,
type: 'string',
required: 'optional'
attribute 'postfixadmin/mysql/instance',
display_name: 'mysql instance',
description:
'PostfixAdmin MySQL instance name to run by the mysql_service '\
'LWRP from the mysql cookbook',
type: 'string',
required: 'optional',
default: 'default'
attribute 'postfixadmin/mysql/data_dir',
display_name: 'mysql data dir',
description: 'PostfixAdmin MySQL data files path',
type: 'string',
required: 'optional',
calcualted: true
attribute 'postfixadmin/mysql/port',
display_name: 'mysql port',
description: 'PostfixAdmin MySQL port',
type: 'string',
required: 'optional',
default: '3306'
attribute 'postfixadmin/mysql/run_group',
display_name: 'mysql run group',
description: 'PostfixAdmin MySQL system group',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/mysql/run_user',
display_name: 'mysql run user',
description: 'PostfixAdmin MySQL system user',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/mysql/version',
display_name: 'mysql version',
description: 'PostfixAdmin MySQL version to install',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/conf/encrypt',
display_name: 'encryption configuration',
description: 'The way do you want the passwords to be crypted',
type: 'string',
required: 'optional',
default: '"md5crypt"'
attribute 'postfixadmin/conf/domain_path',
display_name: 'domain path configuration',
description: 'Whether you want to store the mailboxes per domain',
choice: %w("YES" "NO"),
type: 'string',
required: 'optional',
default: '"YES"'
attribute 'postfixadmin/conf/domain_in_mailbox',
display_name: 'domain in mailbox configuration',
description: 'Whether you want to have the domain in your mailbox',
choice: %w("YES" "NO"),
type: 'string',
required: 'optional',
default: '"NO"'
attribute 'postfixadmin/conf/fetchmail',
display_name: 'enable fetchmail',
description: 'Whether you want fetchmail tab',
choice: %w("YES" "NO"),
type: 'string',
required: 'optional',
default: '"NO"'
attribute 'postfixadmin/packages/requirements',
display_name: 'postfixadmin packages requirements',
description: 'PostfixAdmin required packages array',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/packages/mysql',
display_name: 'postfixadmin packages mysql',
description: 'PostfixAdmin required packages array for MySQL support',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/packages/postgresql',
display_name: 'postfixadmin packages postgresql',
description:
'PostfixAdmin required packages array for PostgreSQL support',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfixadmin/mysql/server_root_password',
display_name: 'postfixadmin mysql server root password',
description: 'PostfixAdmin MySQL root password.',
type: 'string',
calculated: true
attribute 'postfixadmin/map_files/path',
display_name: 'map files path',
description: 'Path to generate map-files into',
type: 'string',
required: 'optional',
default: '"/etc/postfix/tables"'
attribute 'postfixadmin/map_files/mode',
display_name: 'map files mode',
description: 'Map-files file-mode bits',
type: 'string',
required: 'optional',
default: '00640'
attribute 'postfixadmin/map_files/owner',
display_name: 'map files owner',
description: 'Map-files files owner',
type: 'string',
required: 'optional',
default: '"root"'
attribute 'postfixadmin/map_files/group',
display_name: 'map files group',
description: 'Map-files files group',
type: 'string',
required: 'optional',
default: '"postfix"'
attribute 'postfixadmin/map_files/list',
display_name: 'map files list',
description: 'An array with map file names to generate',
type: 'array',
required: 'optional',
default: [
'db_virtual_alias_maps.cf',
'db_virtual_alias_domain_maps.cf',
'db_virtual_alias_domain_catchall_maps.cf',
'db_virtual_domains_maps.cf',
'db_virtual_mailbox_maps.cf',
'db_virtual_alias_domain_mailbox_maps.cf',
'db_virtual_mailbox_limit_maps.cf'
]
attribute 'postfixadmin/php-fpm/pool',
display_name: 'postfixadmin php-fpm pool',
description: 'PHP-FPM pool name to use with PostfixAdmin.',
type: 'string',
required: 'optional',
default: 'postfixadmin'