Skip to content

Commit 7c206eb

Browse files
authored
Merge pull request #1597 from wazuh/enhancement/1493-roles-creation-improvement-changes
Update to latest 5.0.0 package changes
2 parents 6bb587f + 2760a54 commit 7c206eb

File tree

15 files changed

+50
-38
lines changed

15 files changed

+50
-38
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
roles/vars/urls.yml
1+
roles/vars/artifacts_urls.yml
22
deployment-config-files/
33
*.pem
44
*.ini

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
1010

1111
### Changed
1212

13+
- Enhance indexer role defaults, wazuh-aio playbook, and nginx installation steps for the server role ([#1598](https://github.com/wazuh/wazuh-ansible/pull/1598))
1314
- Use ansible_facts for Wazuh agent tasks ([#1590](https://github.com/wazuh/wazuh-ansible/pull/1590))
1415
- Corrections in opensearch.yml file configuration in the wazuh-indexer role ([#1580](https://github.com/wazuh/wazuh-ansible/pull/1580))
1516
- Add package URLs role for AIO and distributed setups ([#1588](https://github.com/wazuh/wazuh-ansible/pull/1588))

roles/package-urls/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22

33
source: "production"
4-
package_urls_file_uri: "packages.wazuh.com/{{ wazuh_major_minor_version }}/package_urls.txt"
5-
package_urls_file_uri_prerelease: "packages-dev.wazuh.com/{{ wazuh_major_minor_version }}/package_urls.txt"
4+
package_urls_file_uri: "packages.wazuh.com/{{ wazuh_major_minor_version }}/artifacts_urls.yml"
5+
package_urls_file_uri_prerelease: "packages-dev.wazuh.com/{{ wazuh_major_minor_version }}/artifacts_urls.yml"

roles/package-urls/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- name: Download package URLs file
66
get_url:
77
url: "https://{{ package_urls_file_uri_prerelease if source == 'prerelease' else package_urls_file_uri }}"
8-
dest: "{{ playbook_dir }}/roles/vars/urls.yml"
8+
dest: "{{ playbook_dir }}/roles/vars/artifacts_urls.yml"
99
when: source in ['production', 'prerelease']
1010
run_once: true
1111
delegate_to: localhost

roles/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ wazuh_package_revision: "1"
55

66
local_configs_path: "{{ playbook_dir }}/deployment-config-files"
77

8-
urls_file: "urls.yml"
8+
urls_file: "artifacts_urls.yml"

roles/wazuh-agent/tasks/Linux.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@
5757

5858
- name: Linux | Register Wazuh agent
5959
shell: |
60-
/usr/share/wazuh-agent/bin/wazuh-agent --register-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none
60+
/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none
6161
6262
- name: Linux | Start and enable Wazuh Agent service
6363
block:
64-
- name: Linux | Reload systemd daemon
65-
ansible.builtin.command:
66-
cmd: systemctl daemon-reload
64+
- name: Linux | Reload systemd configuration
65+
systemd:
66+
daemon_reload: yes
67+
become: yes
6768

6869
- name: Linux | Ensure Wazuh Agent service is stopped [1/3]
6970
service:

roles/wazuh-agent/tasks/Windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
state: started
3232

3333
- name: Windows | Register Wazuh agent
34-
win_command: '"C:\\Program Files\\wazuh-agent\\wazuh-agent.exe" --register-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none'
34+
win_command: '"C:\\Program Files\\wazuh-agent\\wazuh-agent.exe" --enroll-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none'
3535

3636
- name: Windows | Update Wazuh agent configuration with Wazuh server IP address
3737
win_lineinfile:

roles/wazuh-agent/tasks/macOS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
state: present
4141

4242
- name: MacOS | Register Wazuh agent
43-
command: "/Library/Application\\ Support/Wazuh\\ agent.app/bin/wazuh-agent --register-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none"
43+
command: "/Library/Application\\ Support/Wazuh\\ agent.app/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://{{ wazuh_server_addresses[0] }}:55000 --verification-mode none"
4444

4545
- name: MacOS | Restart Wazuh agent service (MacOS 10.10+)
4646
command: "launchctl kickstart -k system/com.wazuh.agent"

roles/wazuh-dashboard/tasks/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
when:
2525
- ansible_facts.os_family == 'Debian'
2626

27+
- name: Linux | Reload systemd configuration
28+
systemd:
29+
daemon_reload: yes
30+
become: yes
31+
2732
- name: Dashboard-config | Configure Wazuh dashboard
2833
block:
2934
- name: Dashboard-config | Remove current opensearch.hosts configuration
@@ -42,13 +47,6 @@
4247
- https://{{ node }}:9200
4348
{% endfor %}
4449
45-
- name: Dashboard-config | Update Wazuh API URL
46-
replace:
47-
path: /etc/wazuh-dashboard/opensearch_dashboards.yml
48-
regexp: "url: 'https://localhost'"
49-
replace: "url: 'https://{{ wazuh_server_api_host }}'"
50-
become: yes
51-
5250
- name: Dashboard-config | Remove comments from configuration file
5351
replace:
5452
path: "/etc/wazuh-dashboard/opensearch_dashboards.yml"

roles/wazuh-indexer/defaults/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22

33
single_node: false
4+
generate_certs: true
45
instances:
56
aio:
67
name: node-1
7-
ip: '{{ hostvars[inventory_hostname].private_ip }}'
8+
ip: "{{ hostvars[inventory_hostname].private_ip }}"
89
role: aio
910

10-
generate_certs: true
11-
1211
wazuh_indexer_package_download_path: "/tmp/wazuh-indexer"
1312
wazuh_indexer_package_name: "wazuh-indexer-{{ wazuh_full_version }}-{{ wazuh_package_revision }}"

0 commit comments

Comments
 (0)