Skip to content

Commit

Permalink
add: Add solaris tasks to install an agent with custom packages #799
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Gonzalez authored and Rebits committed Sep 5, 2022
1 parent 2a47e30 commit 6571aa1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
8 changes: 8 additions & 0 deletions roles/wazuh/ansible-wazuh-agent/tasks/Solaris.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: Download agent package
get_url:
url: "{{ solaris_agent_pkg }}"
dest: /export/home/vagrant
validate_certs: no

- include_tasks: "installation_from_custom_packages.yml"
when: wazuh_custom_packages_installation_agent_enabled
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@
- (ansible_distribution|lower == "centos" and ansible_distribution_major_version >= "8") or
(ansible_distribution|lower == "redhat" and ansible_distribution_major_version >= "8")

- name: Install Wazuh Agent from .msi packages | custom win_package
win_package:
path: "{{ wazuh_custom_packages_installation_agent_msi_url }}"
state: present
when:
- ansible_os_family == "Windows"
- wazuh_custom_packages_installation_agent_enabled
# Solaris
- name: Create noask file
lineinfile:
path: "/export/home/vagrant/noaskfile"
line: action=nocheck
create: yes
when: ansible_os_family == "Solaris"


- name: Install solaris wazuh agent custom package
become: true
shell: pkgadd -a noaskfile -d wazuh-* -n all
environment:
PATH: "/opt/python3/bin/:/usr/sbin:/usr/bin:/usr/sbin/:/opt/csw/gnu/:/usr/sfw/bin/:/opt/csw/bin/"
args:
chdir: "/export/home/vagrant"
when: ansible_os_family == 'Solaris'
3 changes: 3 additions & 0 deletions roles/wazuh/ansible-wazuh-agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@

- include_tasks: "Linux.yml"
when: ansible_system == "Linux"

- include_tasks: "Solaris.yml"
when: ansible_os_family == "Solaris"

0 comments on commit 6571aa1

Please sign in to comment.