diff --git a/ansible/roles/test/tasks/acltb_cleanup.yml b/ansible/roles/test/tasks/acltb_cleanup.yml index 7c4b9495fa7..b829830162e 100644 --- a/ansible/roles/test/tasks/acltb_cleanup.yml +++ b/ansible/roles/test/tasks/acltb_cleanup.yml @@ -14,7 +14,6 @@ test_expect_file: acltb_expect_messages.txt match_file: loganalyzer_common_match.txt ignore_file: loganalyzer_common_ignore.txt - tests_location: "{{ 'roles/test/tasks' }}" # Separate set_fact is required to be able to use 'testname' fact. - set_fact: @@ -62,6 +61,8 @@ - "{{ acltb_configs }}" - include: roles/test/files/tools/loganalyzer/loganalyzer_init.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" - block: - name: Apply ACL delete configuration @@ -70,6 +71,8 @@ - "{{ acltb_configs }}" always: - include: roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" # Output content of result files to ansible console - shell: cat {{ test_out_dir }}/* @@ -85,3 +88,5 @@ when: errors_found.stdout != "0" - include: roles/test/files/tools/loganalyzer/loganalyzer_end.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" diff --git a/ansible/roles/test/tasks/acltb_configure.yml b/ansible/roles/test/tasks/acltb_configure.yml index f1ef50f5eff..278dbab4c1f 100644 --- a/ansible/roles/test/tasks/acltb_configure.yml +++ b/ansible/roles/test/tasks/acltb_configure.yml @@ -14,7 +14,6 @@ test_expect_file: acltb_expect_messages.txt match_file: loganalyzer_common_match.txt ignore_file: loganalyzer_common_ignore.txt - tests_location: "{{ 'roles/test/tasks' }}" # Separate set_fact is required to be able to use 'testname' fact. - set_fact: @@ -57,6 +56,8 @@ - "{{ acltb_configs }}" - include: roles/test/files/tools/loganalyzer/loganalyzer_init.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" - block: - name: Apply ACL configuration @@ -65,6 +66,8 @@ - "{{ acltb_configs }}" always: - include: roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" # Output content of result files to ansible console - shell: cat {{ test_out_dir }}/* @@ -80,3 +83,5 @@ when: errors_found.stdout != "0" - include: roles/test/files/tools/loganalyzer/loganalyzer_end.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" diff --git a/ansible/roles/test/tasks/acltb_test.yml b/ansible/roles/test/tasks/acltb_test.yml index 4d65ba1fb8e..df36b2d4ee7 100644 --- a/ansible/roles/test/tasks/acltb_test.yml +++ b/ansible/roles/test/tasks/acltb_test.yml @@ -42,7 +42,6 @@ test_expect_file: acltb_expect_messages.txt match_file: loganalyzer_common_match.txt ignore_file: loganalyzer_common_ignore.txt - tests_location: "{{ 'roles/test/tasks' }}" # Separate set_fact is required to be able to use 'testname' fact. - set_fact: @@ -62,6 +61,8 @@ delegate_to: "{{ ptf_host }}" - include: roles/test/files/tools/loganalyzer/loganalyzer_init.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" # Run the ACL PTF test - block: @@ -79,6 +80,8 @@ always: - include: roles/test/files/tools/loganalyzer/loganalyzer_analyze.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}" # Output content of result files to ansible console - shell: cat {{ test_out_dir }}/* @@ -94,3 +97,5 @@ when: errors_found.stdout != "0" - include: roles/test/files/tools/loganalyzer/loganalyzer_end.yml + vars: + tests_location: "{{ 'roles/test/tasks' }}"