-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
258 lines (216 loc) · 13 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
---
# Project source code URL: https://github.com/redmine/redmine
redmine_enabled: true
redmine_identifier: redmine
redmine_version: 6.0.2
redmine_distro: alpine
# The fully-qualified name of your redmine server (e.g. `redmine.example.com`)
redmine_hostname: ''
redmine_container_image: "{{ redmine_container_image_registry_prefix }}redmine:{{ redmine_container_image_tag }}"
redmine_container_image_registry_prefix: docker.io/
redmine_container_image_tag: "{{ redmine_version }}-{{ redmine_distro }}"
redmine_container_image_force_pull: "{{ redmine_container_image.endswith(':latest') }}"
# redmine_container_image_customized is the name of the locally built Redmine image
# which adds various customizations on top of the original (upstream) Redmine image.
# This image will be based on the upstream `redmine_container_image` image, only if `redmine_container_image_customizations_enabled: true`.
redmine_container_image_customized: "localhost/redmine:{{ redmine_container_image_tag }}-customized"
# redmine_container_image_final holds the name of the Redmine image to run depending on whether or not customizations are enabled.
redmine_container_image_final: "{{ redmine_container_image_customized if redmine_container_image_customizations_enabled else redmine_container_image }} "
# redmine_container_image_customizations_enabled controls whether a customized Redmine image will be built.
#
# We toggle this variable to `true` when certain features which require a custom build are enabled.
# Feel free to toggle this to `true` yourself and specify build steps in `redmine_container_image_customizations_dockerfile_body_custom`.
#
# See:
# - `./templates/customizations/Dockerfile.j2`
# - `redmine_container_image_customizations_build_tools_installation_enabled`
redmine_container_image_customizations_enabled: "{{ redmine_container_image_customizations_build_tools_installation_enabled }}"
# Controls whether to install build tools in the container image.
# Enabling certain Redmine plugins may pull dependency gems (e.g. bigdecimal) which require building native code.
redmine_container_image_customizations_build_tools_installation_enabled: false
# The packages to install when `redmine_container_image_customizations_build_tools_installation_enabled` is `true`.
# We sometimes (as is the case for `bigdecimal`) may be able to get by with installing a small set of packages (e.g. `musl-dev`, `gcc`, `make`),
# but installing all of `build-base` (or `build-essential` on Debian-based systems) is a safer bet.
redmine_container_image_customizations_build_tools_installation_packages: "{{ ['build-base'] if redmine_distro.startswith('alpine') else ['build-essential'] }}"
# redmine_container_image_customizations_dockerfile_body_custom contains your custom Dockerfile steps
# for building your customized Redmine image based on the original (upstream) image (`redmine_container_image`).
# A `FROM ...` clause is included automatically so you don't have to.
#
# Example:
# redmine_container_image_customizations_dockerfile_body_custom: |
# RUN echo 'This is a custom step for building the customized container image for Redmine.'
# RUN echo 'You can override redmine_container_image_customizations_dockerfile_body_custom to add your own steps.'
# RUN echo 'You do NOT need to include a FROM clause yourself.'
redmine_container_image_customizations_dockerfile_body_custom: ''
# The base container network. It will be auto-created by this role if it doesn't exist already.
redmine_container_network: "{{ redmine_identifier }}"
# A list of additional container networks that the container would be connected to.
# The role does not create these networks, so make sure they already exist.
# Use this to expose this container to another reverse proxy, which runs in a different container network.
redmine_container_additional_networks: []
redmine_uid: ''
redmine_gid: ''
redmine_base_path: "/redmine"
redmine_data_path: "{{ redmine_base_path }}/data"
redmine_config_path: "{{ redmine_base_path }}/config"
redmine_files_path: "{{ redmine_data_path }}/files"
redmine_plugins_path: "{{ redmine_data_path }}/plugins"
redmine_theme_path: "{{ redmine_data_path }}/{{ redmine_theme_name }}"
redmine_plugin_assets_path: "{{ redmine_data_path }}/plugin_assets"
redmine_customized_container_src_path: "{{ redmine_base_path }}/customized-container-src"
redmine_theme_name: ''
redmine_systemd_required_systemd_services_list: ['docker.service']
redmine_database_type: postgresql
redmine_database_hostname: ''
redmine_database_port: 5432
redmine_database_name: redmine
redmine_database_username: redmine
redmine_database_password: ''
# Redmine reminders
# https://www.redmine.org/projects/redmine/wiki/RedmineReminderEmails
# systemd onCalendar schedule
redmine_reminders_schedule: "*-*-* 07:00:00"
# number of days to remind abou
redmine_reminders_days: 7
# Redmine Recurring Tasks
# https://github.com/southbridgeio/redmine_recurring_tasks
redmine_recurring_tasks_enabled: false
# systemd onCalendar schedule
redmine_recurring_tasks_schedule: "*:0/5"
# Configuration parameters seen below are documented here:
# https://github.com/redmine/redmine/blob/master/config/configuration.yml.example
# secret key base
redmine_secret_key_base: ''
# session encryption token
redmine_secret_token: ''
# base data secret key
redmine_database_cipher_key: ''
# maximum number of simultaneous AJAX uploads
redmine_max_concurrent_ajax_uploads: 10
# smtp server address
redmine_email_delivery_smtp_settings_address: ''
# smtp server port
redmine_email_delivery_smtp_settings_port: 25
# authentication
redmine_email_delivery_smtp_settings_authentication: :plain
# username
redmine_email_delivery_smtp_user_name: ''
# password
redmine_email_delivery_smtp_password: ''
# Default redmine configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.
#
# For a more advanced customization, you can extend the default (see `redmine_configuration_extension_yaml`)
# or completely replace this variable with your own template.
#
# The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
# This is unlike what it does when looking up YAML template files (no automatic parsing there).
redmine_configuration_default: "{{ lookup('template', 'templates/config/configuration.yml.j2') }}"
# Your custom yaml configuration for Element should go to `redmine_configuration_extension_yaml`.
# This configuration extends the default starting configuration (`redmine_configuration_default`).
#
# You can override individual variables from the default configuration, or introduce new ones.
#
# If you need something more special, you can take full control by
# completely redefining `redmine_configuration_default`.
#
# Example configuration extension follows:
#
# redmine_configuration_extension_yaml: |
# session_expire_time: 60
# session_refresh_time: 5
redmine_configuration_extension_yaml: '{}'
redmine_configuration_extension: "{{ redmine_configuration_extension_yaml | from_yaml if redmine_configuration_extension_yaml | from_yaml is mapping else {} }}"
# Holds the final redmine configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `redmine_configuration_default`.
redmine_configuration: "{{ redmine_configuration_default | from_yaml | combine(redmine_configuration_extension, recursive=True) }}"
# redmine_config_virtual_port controls the VIRTUAL_PORT environment variable,
# which controls redmine's HTTP port in the container
redmine_config_virtual_port: 3000
# redmine_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
# See `../templates/labels.j2` for details.
#
# To inject your own other container labels, see `redmine_container_labels_additional_labels`.
redmine_container_labels_traefik_enabled: true
redmine_container_labels_traefik_docker_network: '{{ redmine_identifier }}'
redmine_container_labels_traefik_rule: "Host(`{{ redmine_hostname }}`)"
redmine_container_labels_traefik_priority: 0
redmine_container_labels_traefik_entrypoints: web-secure
redmine_container_labels_traefik_tls: "{{ redmine_container_labels_traefik_entrypoints != 'web' }}"
redmine_container_labels_traefik_tls_certResolver: default # noqa var-naming
# Controls which additional headers to attach to all HTTP responses.
# To add your own headers, use `redmine_container_labels_traefik_additional_response_headers_custom`
redmine_container_labels_traefik_additional_response_headers: "{{ redmine_container_labels_traefik_additional_response_headers_auto | combine(redmine_container_labels_traefik_additional_response_headers_custom) }}"
redmine_container_labels_traefik_additional_response_headers_auto: |
{{
{}
| combine ({'X-XSS-Protection': redmine_http_header_xss_protection} if redmine_http_header_xss_protection else {})
| combine ({'X-Frame-Options': redmine_http_header_frame_options} if redmine_http_header_frame_options else {})
| combine ({'X-Content-Type-Options': redmine_http_header_content_type_options} if redmine_http_header_content_type_options else {})
| combine ({'Content-Security-Policy': redmine_http_header_content_security_policy} if redmine_http_header_content_security_policy else {})
| combine ({'Permission-Policy': redmine_http_header_content_permission_policy} if redmine_http_header_content_permission_policy else {})
| combine ({'Strict-Transport-Security': redmine_http_header_strict_transport_security} if redmine_http_header_strict_transport_security and redmine_container_labels_traefik_tls else {})
}}
redmine_container_labels_traefik_additional_response_headers_custom: {}
# redmine_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
#
# Example:
# redmine_container_labels_additional_labels: |
# my.label=1
# another.label="here"
redmine_container_labels_additional_labels: ''
# A list of extra arguments to pass to the container
redmine_container_extra_arguments: []
# List of systemd services that redmine.service depends on
redmine_systemd_required_services_list: ['docker.service']
# Specifies the value of the `X-XSS-Protection` header
# Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
#
# Learn more about it is here:
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
# - https://portswigger.net/web-security/cross-site-scripting/reflected
redmine_http_header_xss_protection: "1; mode=block"
# Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
redmine_http_header_frame_options: SAMEORIGIN
# Specifies the value of the `X-Content-Type-Options` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
redmine_http_header_content_type_options: nosniff
# Specifies the value of the `Content-Security-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
redmine_http_header_content_security_policy: frame-ancestors 'self'
# Specifies the value of the `Permission-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
redmine_http_header_content_permission_policy: "{{ 'interest-cohort=()' if redmine_floc_optout_enabled else '' }}"
# Specifies the value of the `Strict-Transport-Security` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
redmine_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if redmine_hsts_preload_enabled else '' }}"
# Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
#
# Learn more about what it is here:
# - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
# - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
# - https://amifloced.org/
#
# Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
# See: `redmine_content_permission_policy`
redmine_floc_optout_enabled: true
# Controls if HSTS preloading is enabled
#
# In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
# indicates a willingness to be "preloaded" into browsers:
# `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
# For more information visit:
# - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
# - https://hstspreload.org/#opt-in
# See: `redmine_http_header_strict_transport_security`
redmine_hsts_preload_enabled: false
# redmine_container_additional_environment_variables contains a multiline string with additional environment variables to pass to the container.
#
# Example:
# redmine_container_additional_environment_variables: |
# VAR=1
# ANOTHER=value
redmine_container_additional_environment_variables: ''