-
Notifications
You must be signed in to change notification settings - Fork 32
/
modify_files.yml
42 lines (35 loc) · 1.5 KB
/
modify_files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- 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_extra_params }}"
args:
executable: "python3"
chdir: "{{ agents_linux_output_path }}"
- name: Copy list of modified files from Agents to Ansible Controller host | Linux
fetch:
src: "{{ agents_linux_output_path }}/{{ files_modified_output_path }}"
dest: "agents_outputs/{{ event }}/{{ files_modified_output_path }}-{{ inventory_hostname }}"
flat: yes
become: yes
when:
- inventory_hostname in groups['linuxagents']
- 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_extra_params }}"
args:
executable: "python"
chdir: "{{ agents_windows_output_path }}"
- name: Copy list of modified files from Agents to Ansible Controller host | Windows
fetch:
src: "{{ agents_windows_output_path }}/{{ files_generated_output_path }}"
dest: "agents_outputs/{{ event }}/{{ files_modified_output_path }}-{{ inventory_hostname }}"
flat: yes
when:
- inventory_hostname in groups['windowsagents']
- name: Copy the output files from Ansible Controller to the Managers
become: true
synchronize:
src: "agents_outputs/modified/"
dest: "{{ agents_results_manager_path }}/{{ event }}/"
when:
- inventory_hostname in groups['masters']