Agent package is downloaded and deleted
This commit is contained in:
parent
e1568d00eb
commit
4ef5c37970
@ -56,7 +56,7 @@ wazuh_winagent_config:
|
|||||||
|
|
||||||
# macOS deployment
|
# macOS deployment
|
||||||
wazuh_macos_config:
|
wazuh_macos_config:
|
||||||
download_dir: /
|
download_dir: /tmp/
|
||||||
install_dir: /Library/Ossec/
|
install_dir: /Library/Ossec/
|
||||||
|
|
||||||
wazuh_dir: "/var/ossec"
|
wazuh_dir: "/var/ossec"
|
||||||
|
|||||||
@ -15,4 +15,18 @@
|
|||||||
- name: macOS | Check if Wazuh installer is already downloaded
|
- name: macOS | Check if Wazuh installer is already downloaded
|
||||||
stat:
|
stat:
|
||||||
path: "{{ wazuh_macos_config.download_dir }}{{ wazuh_macos_package_name }}"
|
path: "{{ wazuh_macos_config.download_dir }}{{ wazuh_macos_package_name }}"
|
||||||
register: wazuh_package_downloaded
|
register: wazuh_package_downloaded
|
||||||
|
|
||||||
|
- name: macOS | Download Wazuh Agent package
|
||||||
|
get_url:
|
||||||
|
url: "{{ wazuh_macos_package_url }}"
|
||||||
|
dest: "{{ wazuh_macos_config.download_dir }}"
|
||||||
|
when:
|
||||||
|
- not wazuh_package_downloaded.stat.exists
|
||||||
|
|
||||||
|
- name: macOS | Delete downloaded Wazuh agent installer file
|
||||||
|
file:
|
||||||
|
path: "{{ wazuh_macos_config.download_dir }}{{ wazuh_macos_package_name }}"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- wazuh_package_downloaded.stat.exists
|
||||||
Loading…
Reference in New Issue
Block a user