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 +%}