Fix cleanup tasks for Wazuh Manager and Agent

This commit is contained in:
Jose M 2019-11-25 18:54:21 +01:00
parent c9c00b82c2
commit fa0e3f1640
2 changed files with 24 additions and 16 deletions

View File

@ -11,11 +11,13 @@
state: present
- name: Removing old files
file: "/tmp/{{ wazuh_agent_sources_installation.branch }}.tar.gz"
file:
path: "/tmp/{{ wazuh_agent_sources_installation.branch }}.tar.gz"
state: absent
- name: Removing old folders
file: "/tmp/wazuh-{{ wazuh_agent_sources_installation.branch }}"
file:
path: "/tmp/wazuh-{{ wazuh_agent_sources_installation.branch }}"
state: absent
- name: Installing policycoreutils-python (RedHat families)
@ -86,9 +88,11 @@
chdir: "/tmp/wazuh-{{ wazuh_agent_sources_installation.branch }}"
- name: Cleanup downloaded files
file: "/tmp/{{ wazuh_agent_sources_installation.branch }}.tar.gz"
file:
path: "/tmp/{{ wazuh_agent_sources_installation.branch }}.tar.gz"
state: absent
- name: Cleanup created folders
file: "/tmp/wazuh-{{ wazuh_agent_sources_installation.branch }}"
file: "/tmp/{{ wazuh_agent_sources_installation.branch }}.tar.gz"
path: "/tmp/wazuh-{{ wazuh_agent_sources_installation.branch }}"
state: absent

View File

@ -19,11 +19,13 @@
state: present
- name: Removing old files
file: "/tmp/{{ wazuh_manager_sources_installation.branch }}.tar.gz"
file:
path: "/tmp/{{ wazuh_manager_sources_installation.branch }}.tar.gz"
state: absent
- name: Removing old folders
file: "/tmp/wazuh-{{ wazuh_manager_sources_installation.branch }}"
file:
path: "/tmp/wazuh-{{ wazuh_manager_sources_installation.branch }}"
state: absent
- name: Installing policycoreutils-python (RedHat families)
@ -98,11 +100,13 @@
chdir: "/tmp/wazuh-{{ wazuh_manager_sources_installation.branch }}"
- name: Cleanup downloaded files
file: "/tmp/{{ wazuh_manager_sources_installation.branch }}.tar.gz"
file:
path: "/tmp/{{ wazuh_manager_sources_installation.branch }}.tar.gz"
state: absent
- name: Cleanup created folders
file: "/tmp/wazuh-{{ wazuh_manager_sources_installation.branch }}"
file:
path: "/tmp/wazuh-{{ wazuh_manager_sources_installation.branch }}"
state: absent
when: