Skip to content
Snippets Groups Projects
Verified Commit cbb5d9e9 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

gitlab: Fix idempotence for compose file

Currently the gitlab container is recreated everytime time the playbook
is running, even when no changes were made to gitlab itself. This is
caused by the addition of a random "omit placeholder" that Ansible adds
when using the `| default(omit)` filter instead of just leaving it empty.

While alone, that works fine, within a value it stays there instead of
becoming actually omitted and an empty string. As this random string
changes on every run of Ansible, the environment variable in the compose
file changes every run and this causes the recreation of the gitlab
container.

This patch removes the omit statement and replaces it with an empty
string, which should solve the whole problem.
parent c8bb9b1d
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,11 @@ services: ...@@ -20,11 +20,11 @@ services:
enabled: true, enabled: true,
report_only: false, report_only: false,
directives: { directives: {
default_src: "'self' {{ gitlab_csp.default_src | default(omit) }}", default_src: "'self' {{ gitlab_csp.default_src | default("") }}",
script_src: "'self' {{ gitlab_csp.script_src | default(omit) }} 'unsafe-eval'", script_src: "'self' {{ gitlab_csp.script_src | default("") }} 'unsafe-eval'",
frame_ancestor: "'self'", frame_ancestor: "'self'",
frame_src: "'self' {{ gitlab_csp.frame_src | default(omit) }}", frame_src: "'self' {{ gitlab_csp.frame_src | default("") }}",
img_src: "'self' https://{{ gitlab_libravatar_ssl }} {{ gitlab_csp.img_src | default(omit) }} data: blob:", img_src: "'self' https://{{ gitlab_libravatar_ssl }} {{ gitlab_csp.img_src | default("") }} data: blob:",
style_src: "'self' 'unsafe-inline'", style_src: "'self' 'unsafe-inline'",
worker_src: "'self' blob:", worker_src: "'self' blob:",
object_src: "'none'" object_src: "'none'"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment