From b84556a4974244de3585195153a4c702d5d7dd8b Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Fri, 9 Aug 2024 23:03:40 +0530 Subject: [PATCH] sit-test-cases: Modify test-info.yml to define all shares Signed-off-by: Anoop C S --- .../test.sit-test-cases/tasks/prepare/main.yml | 1 - .../templates/test-info.yml.j2 | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/playbooks/ansible/roles/test.sit-test-cases/tasks/prepare/main.yml b/playbooks/ansible/roles/test.sit-test-cases/tasks/prepare/main.yml index 2b7018b..22fcd22 100644 --- a/playbooks/ansible/roles/test.sit-test-cases/tasks/prepare/main.yml +++ b/playbooks/ansible/roles/test.sit-test-cases/tasks/prepare/main.yml @@ -31,7 +31,6 @@ dest: /root/test-info.yml vars: public_interfaces: "{{ (config.be.variant == 'mgr') | ternary(node_network_public_interfaces, ctdb_network_public_interfaces) }}" - sharenames: "{{ samba_shares | map(attribute='name') | list }}" - name: Create a symlink for test-info.yml file file: diff --git a/playbooks/ansible/roles/test.sit-test-cases/templates/test-info.yml.j2 b/playbooks/ansible/roles/test.sit-test-cases/templates/test-info.yml.j2 index 23ac6fa..eaf39df 100644 --- a/playbooks/ansible/roles/test.sit-test-cases/templates/test-info.yml.j2 +++ b/playbooks/ansible/roles/test.sit-test-cases/templates/test-info.yml.j2 @@ -13,10 +13,20 @@ users: backend: {{ config.be.name }} shares: - {%- for share in sharenames +%} - {{ share }}-{{ config.be.name }}-{{ config.be.variant }}: + {%- for share in samba_shares +%} + {%- if share.strategy is defined and config.be.variant != 'scale' +%} + {%- for method in share.strategy +%} + {{ share.name }}-{{ config.be.name }}-{{ config.be.variant}}-{{ method }}: backend: name: {{ config.be.name }} variant: {{ config.be.variant}} - path: {{ config.paths.mount }}/backends/{{ share }} + path: {{ config.paths.mount }}/backends/{{ share.name }} + {%- endfor +%} + {%- else +%} + {{ share.name }}-{{ config.be.name }}-{{ config.be.variant }}: + backend: + name: {{ config.be.name }} + variant: {{ config.be.variant}} + path: {{ config.paths.mount }}/backends/{{ share.name }} + {%- endif +%} {%- endfor +%}