Skip to content

Commit 2760a54

Browse files
authored
Merge pull request #1598 from wazuh/enhancement/1493-roles-creation-improvement
Enhance indexer role defaults, wazuh-aio playbook, and nginx installation steps for the server role
2 parents 04fb54a + 75ec296 commit 2760a54

File tree

13 files changed

+47
-30
lines changed

13 files changed

+47
-30
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ All notable changes to this project will be documented in this file.
1010

1111
### Changed
1212

13-
- Update to latest 5.0.0 package changes ([#1597](https://github.com/wazuh/wazuh-ansible/pull/1597))
14-
- Enhance indexer role defaults, wazuh-aio playbook, and nginx installation steps for the server role ([#1594](https://github.com/wazuh/wazuh-ansible/pull/1594))
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))
1514
- Use ansible_facts for Wazuh agent tasks ([#1590](https://github.com/wazuh/wazuh-ansible/pull/1590))
1615
- Corrections in opensearch.yml file configuration in the wazuh-indexer role ([#1580](https://github.com/wazuh/wazuh-ansible/pull/1580))
1716
- 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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@
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-dashboard/tasks/main.yml

Lines changed: 5 additions & 0 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

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 }}"

roles/wazuh-indexer/tasks/dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
shell: sysctl -p
2828
become: yes
2929
when:
30-
- ansible_facts.os_family == 'Amazon'
30+
- ansible_facts.distribution == 'Amazon'
3131

3232
- name: RHEL, CentOS, and Amazon Linux 2 | Configure system settings and install dependencies
3333
block:

roles/wazuh-indexer/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- import_tasks: "config_files_setup.yml"
2626
become: yes
2727

28-
- name: Reload systemd configuration
28+
- name: Linux | Reload systemd configuration
2929
systemd:
3030
daemon_reload: yes
3131
become: yes

0 commit comments

Comments
 (0)