/
main.yml
678 lines (577 loc) · 26.3 KB
/
main.yml
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. _dokuwiki__ref_defaults:
# debops.dokuwiki default variables [[[
# =====================================
# .. contents:: Sections
# :local:
#
# .. include:: ../../../../includes/global.rst
# Basic configuration options [[[
# -------------------------------
# .. envvar:: dokuwiki__fqdn [[[
#
# Default domain which will be used to host the "main" wiki instance.
dokuwiki__fqdn: 'wiki.{{ ansible_domain }}'
# ]]]
# .. envvar:: dokuwiki__domains [[[
#
# List of domains on which DokuWiki is configured in nginx.
dokuwiki__domains: '{{ [ dokuwiki__fqdn ] +
dokuwiki__farm_animals|d([]) }}'
# ]]]
# .. envvar:: dokuwiki__nginx_auth_realm [[[
#
# Basic Auth realm displayed in the login dialog.
dokuwiki__nginx_auth_realm: 'Wiki access is restricted'
# ]]]
# .. envvar:: dokuwiki__nginx_access_policy [[[
#
# Access policy defined using :ref:`debops.nginx` role, applied to this DokuWiki.
dokuwiki__nginx_access_policy: ''
# ]]]
# .. envvar:: dokuwiki__nginx_filename [[[
#
# Name of the nginx configuration file for DokuWiki website, without the
# ``.conf`` extension.
dokuwiki__nginx_filename: 'debops.dokuwiki'
# ]]]
# ]]]
# User, group, app directories [[[
# --------------------------------
# .. envvar:: dokuwiki__user [[[
#
# DokuWiki system user account.
dokuwiki__user: 'dokuwiki'
# ]]]
# .. envvar:: dokuwiki__group [[[
#
# DokuWiki system user group.
dokuwiki__group: 'dokuwiki'
# ]]]
# .. envvar:: dokuwiki__home [[[
#
# DokuWiki home directory.
dokuwiki__home: '{{ (ansible_local.nginx.www
if (ansible_local|d() and ansible_local.nginx|d() and
ansible_local.nginx.www|d())
else "/srv/www") + "/" + dokuwiki__user }}'
# ]]]
# .. envvar:: dokuwiki__src [[[
#
# Base path for git bare repository with DokuWiki source.
dokuwiki__src: '{{ (ansible_local.root.src
if (ansible_local|d() and ansible_local.root|d() and
ansible_local.root.src|d())
else "/usr/local/src") + "/" + dokuwiki__user }}'
# ]]]
# .. envvar:: dokuwiki__www [[[
#
# Base web root directory for DokuWiki website.
dokuwiki__www: '{{ (ansible_local.nginx.www
if (ansible_local|d() and ansible_local.nginx|d() and
ansible_local.nginx.www|d())
else "/srv/www") + "/" + dokuwiki__user }}'
# ]]]
# .. envvar:: dokuwiki__webserver_user [[[
#
# DokuWiki webserver user (needs read-only access to the website code).
dokuwiki__webserver_user: '{{ ansible_local.nginx.user
if (ansible_local|d() and
ansible_local.nginx|d() and
ansible_local.nginx.user|d())
else "www-data" }}'
# ]]]
# ]]]
# Application sources [[[
# -----------------------
# .. envvar:: dokuwiki__git_repo [[[
#
# DokuWiki source repository.
dokuwiki__git_repo: 'https://github.com/splitbrain/dokuwiki.git'
# ]]]
# .. envvar:: dokuwiki__git_dest [[[
#
# DokuWiki source directory on the host.
dokuwiki__git_dest: '{{ dokuwiki__src + "/" + dokuwiki__git_repo.split("://")[1] }}'
# ]]]
# .. envvar:: dokuwiki__git_version [[[
#
# DokuWiki git branch to deploy.
dokuwiki__git_version: 'stable'
# ]]]
# .. envvar:: dokuwiki__git_checkout [[[
#
# Default path where DokuWiki source files will be deployed.
dokuwiki__git_checkout: '{{ dokuwiki__www + "/sites/" + dokuwiki__domains[0] + "/public" }}'
# ]]]
# ]]]
# LDAP environment [[[
# --------------------
# .. envvar:: dokuwiki__ldap_enabled [[[
#
# Enable or disable support for LDAP authentication in DokuWiki. Only the main
# instance is supported at the moment.
dokuwiki__ldap_enabled: '{{ True
if (ansible_local|d() and ansible_local.ldap|d() and
(ansible_local.ldap.enabled|d())|bool)
else False }}'
# ]]]
# .. envvar:: dokuwiki__ldap_base_dn [[[
#
# The base Distinguished Name which should be used to create Distinguished
# Names of the LDAP directory objects, defined as a YAML list. If this variable
# is empty, LDAP configuration will not be performed.
dokuwiki__ldap_base_dn: '{{ ansible_local.ldap.base_dn
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.base_dn|d())
else [] }}'
# ]]]
# .. envvar:: dokuwiki__ldap_device_dn [[[
#
# The Distinguished Name of the current host LDAP object, defined as a YAML
# list. It will be used as a base for the DokuWiki service account LDAP
# object. If the list is empty, the role will not create the account LDAP
# object automatically.
dokuwiki__ldap_device_dn: '{{ ansible_local.ldap.device_dn
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.device_dn|d())
else [] }}'
# ]]]
# .. envvar:: dokuwiki__ldap_self_rdn [[[
#
# The Relative Distinguished Name of the account LDAP object used by the
# DokuWiki service to access the LDAP directory.
dokuwiki__ldap_self_rdn: 'uid=dokuwiki'
# ]]]
# .. envvar:: dokuwiki__ldap_self_object_classes [[[
#
# List of the LDAP object classes which will be used to create the LDAP object
# used by the DokuWiki service to access the LDAP directory.
dokuwiki__ldap_self_object_classes: [ 'account', 'simpleSecurityObject' ]
# ]]]
# .. envvar:: dokuwiki__ldap_self_attributes [[[
#
# YAML dictionary that defines the attributes of the LDAP object used by the
# DokuWiki service to access the LDAP directory.
dokuwiki__ldap_self_attributes:
uid: '{{ dokuwiki__ldap_self_rdn.split("=")[1] }}'
userPassword: '{{ dokuwiki__ldap_bindpw }}'
host: '{{ [ ansible_fqdn, ansible_hostname ] | unique }}'
description: 'Account used by the "DokuWiki" service to access the LDAP directory'
# ]]]
# .. envvar:: dokuwiki__ldap_binddn [[[
#
# The Distinguished Name of the account LDAP object used by the
# DokuWiki service to bind to the LDAP directory.
dokuwiki__ldap_binddn: '{{ ([ dokuwiki__ldap_self_rdn ] + dokuwiki__ldap_device_dn) | join(",") }}'
# ]]]
# .. envvar:: dokuwiki__ldap_bindpw [[[
#
# The password stored in the account LDAP object used by the DokuWiki service
# to bind to the LDAP directory.
dokuwiki__ldap_bindpw: '{{ lookup("password", secret + "/ldap/credentials/"
+ dokuwiki__ldap_binddn | to_uuid + ".password length=32") }}'
# ]]]
# .. envvar:: dokuwiki__ldap_people_rdn [[[
#
# The Relative Distinguished Name of the LDAP object which contains the user
# accounts stored in LDAP.
dokuwiki__ldap_people_rdn: '{{ ansible_local.ldap.people_rdn
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.people_rdn|d())
else "ou=People" }}'
# ]]]
# .. envvar:: dokuwiki__ldap_people_dn [[[
#
# The Distinguished Name of the LDAP object which contains the user accounts
# used by DokuWiki.
dokuwiki__ldap_people_dn: '{{ [ dokuwiki__ldap_people_rdn ] + dokuwiki__ldap_base_dn }}'
# ]]]
# .. envvar:: dokuwiki__ldap_private_groups [[[
#
# When this variable is enabled, the :ref:`debops.ldap` role will create
# a separate LDAP objects that manage the DokuWiki groups as subtree of the
# DokiWiki service LDAP object. If you set this parameter to ``False``, the
# role will use the global ``ou=Groups,dc=example,dc=org`` subtree instead.
dokuwiki__ldap_private_groups: True
# ]]]
# .. envvar:: dokuwiki__ldap_groups_rdn [[[
#
# The Relative Distinguished Name of the LDAP object which contains the groups
# stored in LDAP.
dokuwiki__ldap_groups_rdn: '{{ ansible_local.ldap.groups_rdn
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.groups_rdn|d())
else "ou=Groups" }}'
# ]]]
# .. envvar:: dokuwiki__ldap_groups_dn [[[
#
# The Distinguished Name of the LDAP object which contains the groups used by
# DokuWiki. If private groups are enabled, this object will be created
# automatically.
dokuwiki__ldap_groups_dn: '{{ ([ dokuwiki__ldap_groups_rdn, dokuwiki__ldap_self_rdn ]
+ dokuwiki__ldap_device_dn)
if dokuwiki__ldap_private_groups|bool
else ([ dokuwiki__ldap_groups_rdn ] + dokuwiki__ldap_base_dn) }}'
# ]]]
# .. envvar:: dokuwiki__ldap_admin_group_rdn [[[
#
# The Relative Distinguished Name of the LDAP object which defines who has
# administrative access to a given DokuWiki instance.
dokuwiki__ldap_admin_group_rdn: 'cn=DokuWiki Administrators'
# ]]]
# .. envvar:: dokuwiki__ldap_admin_group_dn [[[
#
# The Distinguished Name of the LDAP object which defines who has
# administrative access to a given DokuWiki instance.
dokuwiki__ldap_admin_group_dn: '{{ [ dokuwiki__ldap_admin_group_rdn ]
+ dokuwiki__ldap_groups_dn }}'
# ]]]
# .. envvar:: dokuwiki__ldap_object_owner_rdn [[[
#
# The Relative Distinguished Name of the LDAP object of the person who
# installed a given DokuWiki instance and is used as the owner of the "DokuWiki
# Administrators" group.
dokuwiki__ldap_object_owner_rdn: 'uid={{ lookup("env", "USER") }}'
# ]]]
# .. envvar:: dokuwiki__ldap_object_ownerdn [[[
#
# The Distinguished Name of the LDAP object of the person who installed a given
# DokuWiki instance and is used as the owner of the "DokuWiki Administrators"
# group, defined as a string.
dokuwiki__ldap_object_ownerdn: '{{ ([ dokuwiki__ldap_object_owner_rdn, dokuwiki__ldap_people_rdn ]
+ dokuwiki__ldap_base_dn) | join(",") }}'
# ]]]
# ]]]
# LDAP connection options [[[
# ---------------------------
# .. envvar:: dokuwiki__ldap_server_uri [[[
#
# The URI address of the LDAP server used by DokuWiki.
dokuwiki__ldap_server_uri: '{{ (ansible_local.ldap.uri
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.uri|d())
else [""]) | first }}'
# ]]]
# .. envvar:: dokuwiki__ldap_server_port [[[
#
# The TCP port which should be used for connections to the LDAP server.
dokuwiki__ldap_server_port: '{{ ansible_local.ldap.port
if (ansible_local|d() and ansible_local.ldap|d() and
ansible_local.ldap.port|d())
else ("389" if dokuwiki__ldap_start_tls|bool else "636") }}'
# ]]]
# .. envvar:: dokuwiki__ldap_start_tls [[[
#
# If ``True``, DokuWiki will use STARTTLS extension to make encrypted
# connections to the LDAP server.
dokuwiki__ldap_start_tls: '{{ ansible_local.ldap.start_tls
if (ansible_local|d() and ansible_local.ldap|d() and
(ansible_local.ldap.start_tls|d())|bool)
else True }}'
# ]]]
# .. envvar:: dokuwiki__ldap_user_filter [[[
#
# The LDAP filter used to look up user accounts in the directory.
dokuwiki__ldap_user_filter: '(&
(objectClass=inetOrgPerson)
(|
(uid=%{user})
(mail=%{user})
)
(|
(authorizedService=dokuwiki)
(authorizedService=web-public)
(authorizedService=\\*)
)
)'
# ]]]
# .. envvar:: dokuwiki__ldap_group_filter [[[
#
# The LDAP filter used to loo up groups in the directory.
dokuwiki__ldap_group_filter: '(&
(objectClass=groupOfNames)
(member=%{dn})
)'
# ]]]
# .. envvar:: dokuwiki__ldap_configuration [[[
#
# The variable which contains the LDAP configuration stored in the
# :file:`conf/local.protected.php` configuration file. The contents should be
# written in PHP, Jinja can be used for logic outside of the PHP engine.
dokuwiki__ldap_configuration: |
$conf['useacl'] = 1;
$conf['authtype'] = 'authldap';
$conf['superuser'] = '{{ "@" + dokuwiki__ldap_admin_group_rdn.split("=")[1] }}';
$conf['plugin']['authldap']['server'] = '{{ dokuwiki__ldap_server_uri }}';
$conf['plugin']['authldap']['port'] = '{{ dokuwiki__ldap_server_port }}';
$conf['plugin']['authldap']['usertree'] = '{{ dokuwiki__ldap_people_dn | join(",") }}';
$conf['plugin']['authldap']['grouptree'] = '{{ dokuwiki__ldap_groups_dn | join(",") }}';
$conf['plugin']['authldap']['userfilter'] = '{{ dokuwiki__ldap_user_filter }}';
$conf['plugin']['authldap']['groupfilter'] = '{{ dokuwiki__ldap_group_filter }}';
$conf['plugin']['authldap']['version'] = 3;
$conf['plugin']['authldap']['starttls'] = {{ "1" if dokuwiki__ldap_start_tls|bool else "0" }};
$conf['plugin']['authldap']['referrals'] = '0';
$conf['plugin']['authldap']['deref'] = '0';
$conf['plugin']['authldap']['binddn'] = '{{ dokuwiki__ldap_binddn }}';
$conf['plugin']['authldap']['bindpw'] = '{{ dokuwiki__ldap_bindpw }}';
$conf['plugin']['authldap']['userscope'] = 'sub';
$conf['plugin']['authldap']['groupscope'] = 'sub';
$conf['plugin']['authldap']['userkey'] = 'uid';
$conf['plugin']['authldap']['groupkey'] = 'cn';
$conf['plugin']['authldap']['debug'] = 0;
$conf['plugin']['authldap']['modPass'] = 0;
# ]]]
# ]]]
# Protected local configuration [[[
# ---------------------------------
# .. envvar:: dokuwiki__protected_conf_php [[[
#
# This variable defines the contents of the :file:`conf/local.protected.php`
# configuration file. The contents should be written in PHP, Jinja can be used
# for logic outside of the PHP engine.
dokuwiki__protected_conf_php: |
{% if dokuwiki__ldap_enabled|bool %}
{{ dokuwiki__ldap_configuration }}
{% endif %}
# ]]]
# ]]]
# Application plugins, themes, system packages [[[
# ------------------------------------------------
# .. envvar:: dokuwiki__base_packages [[[
#
# List of base APT packages to install for DokuWiki support.
dokuwiki__base_packages: [ 'curl' ]
# ]]]
# .. envvar:: dokuwiki__packages [[[
#
# List of additional APT packages to install for DokuWiki support.
dokuwiki__packages: []
# ]]]
# .. envvar:: dokuwiki__plugins_enabled [[[
#
# Enable or disable installation of DokuWiki plugins and templates.
dokuwiki__plugins_enabled: True
# ]]]
# .. envvar:: dokuwiki__plugins [[[
#
# List of custom DokuWiki plugins to install.
dokuwiki__plugins: []
# ]]]
# .. envvar:: dokuwiki__default_plugins [[[
#
# List of default DokuWiki plugins to install.
dokuwiki__default_plugins: '{{ dokuwiki__plugins_editor +
dokuwiki__plugins_syntax +
dokuwiki__plugins_git }}'
# ]]]
# .. envvar:: dokuwiki__plugins_editor [[[
#
# DokuWiki plugins related to the text editor.
dokuwiki__plugins_editor:
- repo: 'https://github.com/cosmocode/edittable.git'
dest: 'edittable'
- repo: 'https://github.com/albertgasset/dokuwiki-plugin-codemirror'
dest: 'codemirror'
# ]]]
# .. envvar:: dokuwiki__plugins_syntax [[[
#
# DokuWiki plugins that provide additional wiki syntax.
dokuwiki__plugins_syntax:
- repo: 'https://github.com/cosmocode/dig.git'
dest: 'dig'
# This plugin has been replaced by 'switchpanel' plugin
- repo: 'https://github.com/grantemsley/dokuwiki-plugin-patchpanel.git'
dest: 'patchpanel'
state: 'absent'
- repo: 'https://github.com/GreenItSolutions/dokuwiki-plugin-switchpanel.git'
dest: 'switchpanel'
- repo: 'https://github.com/ashrafhasson/dokuwiki-plugin-advrack.git'
dest: 'advrack'
- repo: 'https://github.com/glensc/dokuwiki-plugin-pageredirect.git'
dest: 'pageredirect'
- repo: 'https://github.com/selfthinker/dokuwiki_plugin_wrap'
dest: 'wrap'
- repo: 'https://github.com/splitbrain/dokuwiki-plugin-graphviz.git'
dest: 'graphviz'
- repo: 'https://github.com/leibler/dokuwiki-plugin-todo.git'
dest: 'todo'
- repo: 'https://github.com/splitbrain/dokuwiki-plugin-gallery'
dest: 'gallery'
- repo: 'https://github.com/dokufreaks/plugin-tag'
dest: 'tag'
- repo: 'https://github.com/dokufreaks/plugin-pagelist'
dest: 'pagelist'
- repo: 'https://github.com/tgarc/dokuwiki-plugin-rst'
dest: 'rst'
# ]]]
# .. envvar:: dokuwiki__plugins_git [[[
#
# DokuWiki plugins related to :command:`git` support.
dokuwiki__plugins_git:
- repo: 'https://github.com/kossmac/dokuwiki-plugin-gitlab'
dest: 'gitlab'
- repo: 'https://github.com/ZJ/ghissues.git'
dest: 'ghissues'
- repo: 'https://github.com/splitbrain/dokuwiki-plugin-gh.git'
dest: 'gh'
# ]]]
# .. envvar:: dokuwiki__templates [[[
#
# List of DokuWiki templates.
dokuwiki__templates: []
# ]]]
# .. envvar:: dokuwiki__default_templates [[[
#
# List of default DokuWiki templates.
dokuwiki__default_templates: '{{ dokuwiki__templates_vector }}'
# ]]]
# .. envvar:: dokuwiki__templates_vector [[[
#
# The ``vector`` DokuWiki template.
dokuwiki__templates_vector:
- repo: 'https://github.com/arsava/dokuwiki-template-vector'
dest: 'vector'
# ]]]
# ]]]
# DokuWiki farm [[[
# -----------------
# .. envvar:: dokuwiki__farm [[[
#
# Enable or disable `DokuWiki farms <https://www.dokuwiki.org/farms>`_
# (the vhost variant).
dokuwiki__farm: True
# ]]]
# .. envvar:: dokuwiki__farm_path [[[
#
# Path to animals on DokuWiki farm.
dokuwiki__farm_path: '{{ dokuwiki__www + "/farm" }}'
# ]]]
# .. envvar:: dokuwiki__farm_animals [[[
#
# List of FQDN domains which will define "farm animals".
dokuwiki__farm_animals: []
# ]]]
# ]]]
# Other variables [[[
# -------------------
# .. envvar:: dokuwiki__max_file_size [[[
#
# Maximum upload size, in MB.
dokuwiki__max_file_size: '30'
# ]]]
# ]]]
# Configuration for other Ansible roles [[[
# ----------------------------------------
# .. envvar:: dokuwiki__python__dependent_packages3 [[[
#
# Configuration for the :ref:`debops.python` Ansible role.
dokuwiki__python__dependent_packages3:
- 'python3-docutils'
# ]]]
# .. envvar:: dokuwiki__python__dependent_packages2 [[[
#
# Configuration for the :ref:`debops.python` Ansible role.
dokuwiki__python__dependent_packages2:
- 'python-docutils'
# ]]]
# .. envvar:: dokuwiki__ldap__dependent_tasks [[[
#
# Configuration for the :ref:`debops.ldap` Ansible role.
dokuwiki__ldap__dependent_tasks:
- name: 'Create DokuWiki account for {{ dokuwiki__ldap_device_dn | join(",") }}'
dn: '{{ dokuwiki__ldap_binddn }}'
objectClass: '{{ dokuwiki__ldap_self_object_classes }}'
attributes: '{{ dokuwiki__ldap_self_attributes }}'
no_log: True
state: '{{ "present" if dokuwiki__ldap_device_dn|d() else "ignore" }}'
- name: 'Create DokuWiki group container for {{ dokuwiki__ldap_device_dn | join(",") }}'
dn: '{{ dokuwiki__ldap_groups_dn }}'
objectClass: 'organizationalUnit'
attributes:
ou: '{{ dokuwiki__ldap_groups_rdn.split("=")[1] }}'
description: 'User groups used in DokuWiki'
state: '{{ "present"
if (dokuwiki__ldap_device_dn|d() and
dokuwiki__ldap_private_groups|bool)
else "ignore" }}'
- name: 'Create DokuWiki admin group for {{ dokuwiki__ldap_device_dn | join(",") }}'
dn: '{{ dokuwiki__ldap_admin_group_dn }}'
objectClass: 'groupOfNames'
attributes:
cn: '{{ dokuwiki__ldap_admin_group_rdn.split("=")[1] }}'
owner: '{{ dokuwiki__ldap_object_ownerdn }}'
member: '{{ dokuwiki__ldap_object_ownerdn }}'
state: '{{ "present" if dokuwiki__ldap_device_dn|d() else "ignore" }}'
# ]]]
# .. envvar:: dokuwiki__php__dependent_packages [[[
#
# List of PHP packages to install using :ref:`debops.php` role.
dokuwiki__php__dependent_packages:
- [ 'gmp', 'curl', 'ldap', 'xml' ]
# ]]]
# .. envvar:: dokuwiki__php__dependent_pools [[[
#
# Configuration of the DokuWiki PHP-FPM pool managed by the :ref:`debops.php` role.
dokuwiki__php__dependent_pools:
- name: 'dokuwiki'
user: '{{ dokuwiki__user }}'
group: '{{ dokuwiki__group }}'
php_admin_values:
post_max_size: '{{ dokuwiki__max_file_size }}M'
upload_max_filesize: '{{ dokuwiki__max_file_size }}M'
# ]]]
# .. envvar:: dokuwiki__nginx__dependent_upstreams [[[
#
# Configuration of the DokuWiki nginx upstream, used by :ref:`debops.nginx`.
dokuwiki__nginx__dependent_upstreams:
- name: 'php_dokuwiki'
type: 'php'
php_pool: 'dokuwiki'
# ]]]
# .. envvar:: dokuwiki__nginx__dependent_servers [[[
#
# Configuration of the DokuWiki nginx server, used by :ref:`debops.nginx`.
dokuwiki__nginx__dependent_servers:
- name: '{{ dokuwiki__domains }}'
filename: '{{ dokuwiki__nginx_filename }}'
by_role: 'debops.dokuwiki'
type: 'php'
root: '{{ dokuwiki__git_checkout }}'
access_policy: '{{ dokuwiki__nginx_access_policy }}'
auth_basic_realm: '{{ dokuwiki__nginx_auth_realm }}'
index: 'index.html index.htm index.php doku.php'
options: |
autoindex off;
client_max_body_size {{ dokuwiki__max_file_size }}M;
client_body_buffer_size 128k;
location:
'/': |
try_files $uri $uri/ @dokuwiki;
'@dokuwiki': |
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1 last;
'~ ^/lib.*\.(gif|png|ico|jpg)$': |
expires 31536000s;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
log_not_found off;
'~ /(data|conf|bin|inc|install.php)/': |
deny all;
php_upstream: 'php_dokuwiki'
php_options: |
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
# ]]]
# ]]]
# ]]]