Skip to content

Commit

Permalink
Merge pull request #4770 from wazuh/fix/6067-macos-agent-init
Browse files Browse the repository at this point in the history
Eliminate Redundant Tasks in Wazuh Agent Provisioning Role
  • Loading branch information
davidjiglesias authored Dec 20, 2023
2 parents af7944b + fb9b3dd commit 09b5bf5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file.

### Fixed

- Fix macOS agents provision to enable registration and connection with managers. ([#4770](https:/wazuh/wazuh-qa/pull/4770/)) \- (Framework)
- Fix hardcoded python interpreter in qa_framework role. ([#4658](https:/wazuh/wazuh-qa/pull/4658)) \- (Framework)
- Fix duplicated jq dependency ([#4678](https:/wazuh/wazuh-qa/pull/4678)) \- (Framework)

Expand Down
19 changes: 4 additions & 15 deletions provisioning/playbooks/wazuh_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,8 @@
username: wazuh
password: wazuh

# Agent
- hosts: agent
tasks:
- name: Agents
block:
- name: Install UNIX based agents
become: true
become_user: root
import_role:
name: "../roles/wazuh/ansible-wazuh-agent"
when: ansible_os_family != "Windows"

- name: Install Windows based agents
import_role:
name: "../roles/wazuh/ansible-wazuh-agent"
when: ansible_os_family == "Windows"
roles:
- role: "../roles/wazuh/ansible-wazuh-agent"
become: "{{ ansible_os_family != 'Windows' }}"
become_user: root
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

- name: Windows | Restart Wazuh Agent
win_service: name=WazuhSvc start_mode=auto state=restarted

- name: macOS | Restart Wazuh Agent
command: /Library/Ossec/bin/wazuh-control restart
4 changes: 2 additions & 2 deletions provisioning/roles/wazuh/ansible-wazuh-agent/tasks/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
owner: root
group: wazuh
mode: 0644
notify: restart wazuh-agent
notify: macOS | Restart Wazuh Agent
tags:
- init
- config
Expand All @@ -33,7 +33,7 @@
owner: root
group: wazuh
mode: 0640
notify: restart wazuh-agent
notify: macOS | Restart Wazuh Agent
tags:
- init
- config
Expand Down

0 comments on commit 09b5bf5

Please sign in to comment.