From 9f04c088fcb3669ee67e5012a5739e93a16dd7a1 Mon Sep 17 00:00:00 2001 From: Rshad Zhran Date: Mon, 24 Feb 2020 17:09:08 +0100 Subject: [PATCH] Add extra parameters variable --- tests/system/fim/common_tasks/create_files.yml | 4 ++-- tests/system/fim/common_tasks/delete_files.yml | 4 ++-- tests/system/fim/common_tasks/modify_files.yml | 4 ++-- tests/system/fim/vars/main.yml | 6 +++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/system/fim/common_tasks/create_files.yml b/tests/system/fim/common_tasks/create_files.yml index 8a9982db82..d7b202d6c2 100644 --- a/tests/system/fim/common_tasks/create_files.yml +++ b/tests/system/fim/common_tasks/create_files.yml @@ -1,7 +1,7 @@ --- - block: - name: Run script generate_files.py on agents | Linux - script: "generate_files.py -c {{ files_config_linux_destination_path }} -o {{ files_generated_output_path }}" + script: "generate_files.py -c {{ files_config_linux_destination_path }} -o {{ files_generated_output_path }} {{ create_script_extra_params }}" args: executable: "python3" chdir: "{{ agents_linux_output_path }}" @@ -19,7 +19,7 @@ - block: - name: Run script generate_files.py on agents | Windows - script: "generate_files.py -c {{ files_config_windows_destination_path }} -o {{ files_generated_output_path }}" + script: "generate_files.py -c {{ files_config_windows_destination_path }} -o {{ files_generated_output_path }} {{ create_script_extra_params }}" args: executable: "python" chdir: "{{ agents_windows_output_path }}" diff --git a/tests/system/fim/common_tasks/delete_files.yml b/tests/system/fim/common_tasks/delete_files.yml index 1fb422ac4d..f5fd4458e0 100644 --- a/tests/system/fim/common_tasks/delete_files.yml +++ b/tests/system/fim/common_tasks/delete_files.yml @@ -1,7 +1,7 @@ --- - block: - name: "Delete FIM test files at Wazuh Agents | Linux" - script: "delete_files.py -i {{ files_generated_output_path }} -o {{ files_deleted_output_path }}" + script: "delete_files.py -i {{ files_generated_output_path }} -o {{ files_deleted_output_path }} {{ delete_script_extra_params }}" args: executable: "python3" chdir: "{{ agents_linux_output_path }}" @@ -19,7 +19,7 @@ - block: - name: "Delete FIM test files at Wazuh Agents | Windows" - script: "delete_files.py -i {{ files_generated_output_path }} -o {{ files_deleted_output_path }}" + script: "delete_files.py -i {{ files_generated_output_path }} -o {{ files_deleted_output_path }} {{ delete_script_extra_params }}" args: executable: "python" chdir: "{{ agents_windows_output_path }}" diff --git a/tests/system/fim/common_tasks/modify_files.yml b/tests/system/fim/common_tasks/modify_files.yml index 9ff2f89daf..57a8147d38 100644 --- a/tests/system/fim/common_tasks/modify_files.yml +++ b/tests/system/fim/common_tasks/modify_files.yml @@ -1,7 +1,7 @@ --- - block: - name: "Modify FIM test files at Wazuh Managers | Linux" - script: "modify_files.py -i {{ files_generated_output_path }} -o {{ files_modified_output_path }}" + script: "modify_files.py -i {{ files_generated_output_path }} -o {{ files_modified_output_path }} {{ modify_script_extra_params }}" args: executable: "python3" chdir: "{{ agents_linux_output_path }}" @@ -19,7 +19,7 @@ - block: - name: "Modify FIM test files at Wazuh Managers | Windows" - script: "modify_files.py -i {{ files_generated_output_path }} -o {{ files_modified_output_path }}" + script: "modify_files.py -i {{ files_generated_output_path }} -o {{ files_modified_output_path }} {{ modify_script_extra_params }}" args: executable: "python" chdir: "{{ agents_windows_output_path }}" diff --git a/tests/system/fim/vars/main.yml b/tests/system/fim/vars/main.yml index 41de455e85..643c4c2bbb 100644 --- a/tests/system/fim/vars/main.yml +++ b/tests/system/fim/vars/main.yml @@ -31,4 +31,8 @@ alerts_json_path: "/var/ossec/logs/alerts/alerts.json" agents_results_manager_path: "/opt/agents_files_output" agents_results_elastic_path: "/opt/agents_files_output" # Path on Manager of the imported results from Agents missing_alerts_json_path: "missing_alerts_json.txt" -missing_alerts_elasticsearch_path: "missing_alerts_elasticsearch.txt" \ No newline at end of file +missing_alerts_elasticsearch_path: "missing_alerts_elasticsearch.txt" + +create_script_extra_params: "" +modify_script_extra_params: "" +delete_script_extra_params: "" \ No newline at end of file