From dc171d11cab5b97d18f2b6122ce911c6a63a272e Mon Sep 17 00:00:00 2001 From: Sachin Prabhu Date: Thu, 2 May 2024 16:27:17 +0100 Subject: [PATCH] client.prep: use new format for test-info.yml Use the new test-info.yml file as required by sit-test-cases. Signed-off-by: Sachin Prabhu --- .../client.prep/templates/test-info.yml.j2 | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/playbooks/ansible/roles/client.prep/templates/test-info.yml.j2 b/playbooks/ansible/roles/client.prep/templates/test-info.yml.j2 index 653148d..bb1719b 100644 --- a/playbooks/ansible/roles/client.prep/templates/test-info.yml.j2 +++ b/playbooks/ansible/roles/client.prep/templates/test-info.yml.j2 @@ -1,20 +1,19 @@ -public_interfaces: - {{ public_interfaces | to_nice_yaml | indent(2) }} +server: {{ public_interfaces[0] }} -exported_sharenames: - {{ exported_sharenames | to_nice_yaml | indent(2) }} - -test_users: +users: {%- for name in config.accounts +%} {%- for user_name in config.accounts[name].users +%} {%- set user = config.accounts[name].users[user_name] +%} {%- if user.samba +%} - - username: {{ user_name }} - uid: {{ user.uid }} - password: {{ user.password }} - nodes: {{ config.nodes | dict2items | selectattr('value.accounts', 'contains', name) | map(attribute='key') | list }} + {{ user_name }}: {{ user.password }} {%- endif +%} {%- endfor +%} {%- endfor +%} -test_backend: {{ test_backend }} +backend: {{ test_backend }} + +shares: + {%- for share in exported_sharenames +%} + {{ share }}: + {%- endfor +%} +