From b6769a04defd232da2fe2b063e1964766f0f570a Mon Sep 17 00:00:00 2001 From: Preben Uhrskov Berg Date: Fri, 30 Jul 2021 10:36:17 +0200 Subject: [PATCH] Updated defaults file to conform with deprecated access and secret keys (#3) --- defaults/main.yml | 7 ++++--- templates/minio.env.j2 | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index a4cee93..ebef34c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -35,9 +35,10 @@ minio_server_env_extra: | # Additional MinIO server CLI options minio_server_opts: "" -# MinIO access and secret keys -minio_access_key: "minio" -minio_secret_key: "minio123" +# MinIO root username password +# Reading existing values from deprecated access and secret key varibles +minio_root_username: "{{ minio_access_key | default('minio') }}" +minio_root_password: "{{ minio_secret_key | default('minio123') }}" # Switches to enable/disable the MinIO server and/or MinIO client installation. minio_install_server: true diff --git a/templates/minio.env.j2 b/templates/minio.env.j2 index 9d937e2..566ec9b 100644 --- a/templates/minio.env.j2 +++ b/templates/minio.env.j2 @@ -9,11 +9,11 @@ MINIO_OPTS="--address {{ minio_server_addr }} {{ minio_server_opts }}" {% if minio_access_key %} # Access Key of the server. -MINIO_ACCESS_KEY="{{ minio_access_key }}" +MINIO_ROOT_USERNAME="{{ minio_root_username }}" {% endif %} {% if minio_secret_key %} # Secret key of the server. -MINIO_SECRET_KEY="{{ minio_secret_key }}" +MINIO_ROOT_PASSWORD="{{ minio_root_password }}" {% endif %} {{ minio_server_env_extra }}