From 09e3629d8abd41caa99134bd2ebd9c13a1f13fc7 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <ynerant@crans.org> Date: Fri, 19 Mar 2021 19:39:16 +0100 Subject: [PATCH] [constellation] Fix quotes Signed-off-by: Yohann D'ANELLO <ynerant@crans.org> --- roles/constellation/tasks/main.yml | 20 +++++++++---------- .../constellation/settings_local.py.j2 | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/roles/constellation/tasks/main.yml b/roles/constellation/tasks/main.yml index 787b4aac..2eafe41e 100644 --- a/roles/constellation/tasks/main.yml +++ b/roles/constellation/tasks/main.yml @@ -56,21 +56,21 @@ group: "{{ constellation.group }}" recurse: true -- name: Indicate constellation in motd +- name: Deploy Constellation settings_local.py template: - src: update-motd.d/05-service.j2 - dest: /etc/update-motd.d/05-constellation - mode: 0755 + src: constellation/settings_local.py.j2 + dest: /var/local/constellation/constellation/settings_local.py + mode: 0660 + owner: "{{ constellation.settings_local_owner }}" + group: "{{ constellation.settings_local_group }}" - name: Compile messages django_manage: command: compilemessages project_path: "/var/local/constellation" -- name: Deploy Constellation settings_local.py +- name: Indicate constellation in motd template: - src: constellation/settings_local.py.j2 - dest: /var/local/constellation/constellation/settings_local.py - mode: 0660 - owner: "{{ constellation.settings_local_owner }}" - group: "{{ constellation.settings_local_group }}" + src: update-motd.d/05-service.j2 + dest: /etc/update-motd.d/05-constellation + mode: 0755 diff --git a/roles/constellation/templates/constellation/settings_local.py.j2 b/roles/constellation/templates/constellation/settings_local.py.j2 index 9b0810fe..af90a1b6 100644 --- a/roles/constellation/templates/constellation/settings_local.py.j2 +++ b/roles/constellation/templates/constellation/settings_local.py.j2 @@ -1,8 +1,7 @@ -# -*- mode: python; coding: utf-8 -*- {{ ansible_header | comment }} # A secret key used by the server. -SECRET_KEY = '{{ constellation.django_secret_key }}' +SECRET_KEY = "{{ constellation.django_secret_key }}" # Should the server run in debug mode ? # SECURITY WARNING: don't run with debug turned on in production! @@ -23,7 +22,7 @@ DATABASES = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '{{ constellation.database.name }}', 'USER': '{{ constellation.database.user }}', - 'PASSWORD': '{{ constellation.database.password }}', + 'PASSWORD': "{{ constellation.database.password }}", 'HOST': '{{ constellation.database.host }}', 'PORT': '{{ constellation.database.port }}', }, -- GitLab