-
Notifications
You must be signed in to change notification settings - Fork 23
add wazuh purge playbook #2001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add wazuh purge playbook #2001
Changes from 1 commit
5d87d37
cb7f4ea
60ece59
28e3f8e
7362850
5195b08
aa720fb
0385dc9
53b0289
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| --- | ||
| # This is the playbook version of the wazuh purge tool from: | ||
| # https://github.com/stackhpc/wazuh-server-purge | ||
|
|
||
| - name: Purge Wazuh Server Components | ||
| hosts: wazuh-manager | ||
| become: true | ||
| become_user: root | ||
| tasks: | ||
| # Dashboard | ||
| - name: Disable and stop wazuh-dashboard service | ||
| ansible.builtin.systemd_service: | ||
| name: wazuh-dashboard | ||
| state: stopped | ||
| enabled: no | ||
| daemon_reload: true | ||
|
|
||
| - name: Remove wazuh-dashboard and files | ||
| package: | ||
|
Check failure on line 19 in etc/kayobe/ansible/tools/wazuh-purge.yml
|
||
g0rgamesh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| name: wazuh-dashboard | ||
| state: absent | ||
|
|
||
| - name: Remove wazuh-dashboard directories | ||
| ansible.builtin.file: | ||
| path: "{{ item }}" | ||
| state: absent | ||
| loop: | ||
| - /var/lib/wazuh-dashboard | ||
| - /usr/share/wazuh-dashboard | ||
| - /etc/wazuh-dashboard | ||
| # Manager | ||
| - name: Remove wazuh-manager service | ||
| ansible.builtin.systemd_service: | ||
| name: wazuh-manager | ||
| state: stopped | ||
| enabled: no | ||
| daemon_reload: true | ||
|
|
||
| - name: Remove wazuh-manager and files | ||
| package: | ||
|
Check failure on line 40 in etc/kayobe/ansible/tools/wazuh-purge.yml
|
||
| name: wazuh-manager | ||
| state: absent | ||
|
|
||
| - name: Remove wazuh-manager directories | ||
| ansible.builtin.file: | ||
| path: /var/ossec | ||
| state: absent | ||
| # Filebeat | ||
| - name: Disable and stop filebeat service | ||
| ansible.builtin.systemd_service: | ||
| name: filebeat | ||
| state: stopped | ||
| enabled: no | ||
| daemon_reload: true | ||
|
|
||
| - name: Remove filebeat and files | ||
| package: | ||
|
Check failure on line 57 in etc/kayobe/ansible/tools/wazuh-purge.yml
|
||
| name: filebeat | ||
| state: absent | ||
|
|
||
| - name: Remove filebeat directories | ||
| ansible.builtin.file: | ||
| path: "{{ item }}" | ||
| state: absent | ||
| loop: | ||
| - /var/lib/filebeat | ||
| - /usr/share/filebeat | ||
| - /etc/filebeat | ||
| # Indexer | ||
| - name: Disable and stop wazuh-indexer service | ||
| ansible.builtin.systemd_service: | ||
| name: wazuh-indexer | ||
| state: stopped | ||
| enabled: no | ||
| daemon_reload: true | ||
|
|
||
| - name: Remove wazuh-indexer and files | ||
| package: | ||
|
Check failure on line 78 in etc/kayobe/ansible/tools/wazuh-purge.yml
|
||
| name: wazuh-indexer | ||
| state: absent | ||
|
|
||
| - name: Remove wazuh-indexer directories | ||
| ansible.builtin.file: | ||
| path: "{{ item }}" | ||
| state: absent | ||
| loop: | ||
| - /var/lib/wazuh-indexer | ||
| - /usr/share/wazuh-indexer | ||
| - /etc/wazuh-indexer | ||
Uh oh!
There was an error while loading. Please reload this page.