From 07dda4c8ef86fd79762083f38d68699521e3cf88 Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Tue, 9 Mar 2021 10:00:43 +0100 Subject: [PATCH] Rely on /dev/null to generate passwords --- roles/installer/templates/tower_admin_password_secret.yaml.j2 | 2 +- .../templates/tower_broadcast_websocket_secret.yaml.j2 | 2 +- roles/installer/templates/tower_postgres_secret.yaml.j2 | 2 +- roles/installer/templates/tower_secret_key.yaml.j2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/installer/templates/tower_admin_password_secret.yaml.j2 b/roles/installer/templates/tower_admin_password_secret.yaml.j2 index 0486d6ba..16a2d518 100644 --- a/roles/installer/templates/tower_admin_password_secret.yaml.j2 +++ b/roles/installer/templates/tower_admin_password_secret.yaml.j2 @@ -5,4 +5,4 @@ metadata: name: '{{ meta.name }}-admin-password' namespace: '{{ meta.namespace }}' stringData: - password: '{{ lookup('password', 'ts' + meta.name + 'pg length=32 chars=ascii_letters,digits') }}' + password: '{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}' diff --git a/roles/installer/templates/tower_broadcast_websocket_secret.yaml.j2 b/roles/installer/templates/tower_broadcast_websocket_secret.yaml.j2 index e9ed6ff3..fcf02835 100644 --- a/roles/installer/templates/tower_broadcast_websocket_secret.yaml.j2 +++ b/roles/installer/templates/tower_broadcast_websocket_secret.yaml.j2 @@ -5,4 +5,4 @@ metadata: name: '{{ meta.name }}-broadcast-websocket' namespace: '{{ meta.namespace }}' stringData: - secret: '{{ lookup('password', 'ts' + meta.name + 'pg length=32 chars=ascii_letters,digits') }}' + secret: '{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}' diff --git a/roles/installer/templates/tower_postgres_secret.yaml.j2 b/roles/installer/templates/tower_postgres_secret.yaml.j2 index f9fb4c82..51514d49 100644 --- a/roles/installer/templates/tower_postgres_secret.yaml.j2 +++ b/roles/installer/templates/tower_postgres_secret.yaml.j2 @@ -6,7 +6,7 @@ metadata: name: '{{ meta.name }}-postgres-configuration' namespace: '{{ meta.namespace }}' stringData: - password: '{{ lookup('password', 'p' + meta.name + 'pg length=32 chars=ascii_letters,digits') }}' + password: '{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}' username: '{{ deployment_type }}' database: '{{ deployment_type }}' port: '5432' diff --git a/roles/installer/templates/tower_secret_key.yaml.j2 b/roles/installer/templates/tower_secret_key.yaml.j2 index 223a4a8b..b8c8adcf 100644 --- a/roles/installer/templates/tower_secret_key.yaml.j2 +++ b/roles/installer/templates/tower_secret_key.yaml.j2 @@ -5,4 +5,4 @@ metadata: name: '{{ meta.name }}-secret-key' namespace: '{{ meta.namespace }}' stringData: - secret_key: '{{ lookup('password', 'ts' + meta.name + 'pg length=32 chars=ascii_letters,digits') }}' \ No newline at end of file + secret_key: '{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}'