Initial macOS tasks created

This commit is contained in:
David Correa Rodríguez 2023-10-03 17:05:22 +02:00
parent af5b41ad29
commit e1568d00eb
No known key found for this signature in database
GPG Key ID: 8787C7C9FF271262
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
---
- name: macOS | Check architecture
command: "/usr/bin/uname -m"
register: uname_result
- name: macOS | Set architecture variable
set_fact:
macos_architecture: "{{ 'arm' if uname_result.stdout == 'arm64' else 'intel' }}"
- name: macOS | Set package name and URL based on architecture
set_fact:
wazuh_macos_package_url: "{{ wazuh_macos_intel_package_url if macos_architecture == 'intel' else wazuh_macos_arm_package_url }}"
wazuh_macos_package_name: "{{ wazuh_macos_intel_package_name if macos_architecture == 'intel' else wazuh_macos_arm_package_name }}"
- name: macOS | Check if Wazuh installer is already downloaded
stat:
path: "{{ wazuh_macos_config.download_dir }}{{ wazuh_macos_package_name }}"
register: wazuh_package_downloaded

View File

@ -23,3 +23,6 @@
- include_tasks: "Linux.yml"
when: ansible_system == "Linux"
- include_tasks: "macOS.yml"
when: ansible_system == "Darwin"