From 393b1092e5c26e7ca171a99b4004500eef3a36ac Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 19 Jul 2023 16:46:23 +0200 Subject: [PATCH] fix: Refactor version endpoint json creation to guarantee variable substitution --- .../roles/metacluster/tasks/json-server.yml | 12 +++++------- ansible/vars/metacluster.yml | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/json-server.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/json-server.yml index 6793e04..ad529d8 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/json-server.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/json-server.yml @@ -31,13 +31,11 @@ values: | {{ components['json-server'].chart_values | - combine( { - 'jsonServer': { - 'seedData': { - 'configInline': (components['json-server'].chart_values.jsonServer.seedData.configInline | combine( { 'components': manifest_versions } ) | to_json) - } - } - } ) + combine( { 'jsonServer': { 'seedData': { 'configInline': ( + components['json-server'].chart_values.jsonServer.seedData.configInline | + combine( { 'components': manifest_versions }, { 'appliance': { "version": appliance.version } } ) | + to_json + ) } } } ) }} - name: Ensure json-server API availability diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 8cfe1e2..f62acc8 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -192,7 +192,7 @@ components: seedData: configInline: | { - "appliance": { "version": "{{ appliance.version }}" }, + "appliance": {}, "components": [], "healthz": { "status": "running" } }