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 committed Jun 21, 2022
1 parent 280e02b commit ab94382
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
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 @@ -25,4 +25,22 @@
- ansible_os_family|lower == "redhat"
- wazuh_custom_packages_installation_agent_enabled
- (ansible_distribution|lower == "centos" and ansible_distribution_major_version >= "8") or
(ansible_distribution|lower == "redhat" and ansible_distribution_major_version >= "8")
(ansible_distribution|lower == "redhat" and ansible_distribution_major_version >= "8")

# 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 ab94382

Please sign in to comment.