File tree 10 files changed +42
-38
lines changed
10 files changed +42
-38
lines changed Original file line number Diff line number Diff line change 2
2
skip_list:
3
3
- '106'
4
4
- '401'
5
+ - 'schema'
Original file line number Diff line number Diff line change 4
4
5
5
[ ![ Galaxy Role] ( https://img.shields.io/badge/galaxy-apps_wazuh_agent-purple?style=flat )] ( https://galaxy.ansible.com/lotusnoir/apps_wazuh_agent )
6
6
[ ![ Version] ( https://img.shields.io/github/release/lotusnoir/ansible-apps_wazuh_agent.svg )] ( https://github.com/lotusnoir/ansible-apps_wazuh_agent/releases/latest )
7
- ![ GitHub repo size] ( https://img.shields.io/github/repo-size/lotusnoir/ansible-apps_wazuh_agent?color=orange&style=flat )
7
+ [ ![ GitHub repo size] ( https://img.shields.io/github/repo-size/lotusnoir/ansible-apps_wazuh_agent?color=orange&style=flat )] ( https://galaxy.ansible.com/lotusnoir/apps_wazuh_agent )
8
8
[ ![ downloads] ( https://img.shields.io/ansible/role/d/56847 )] ( https://galaxy.ansible.com/lotusnoir/apps_wazuh_agent )
9
- ![ Ansible Quality Score] ( https://img.shields.io/ansible/quality/56847 )
9
+ [ ![ Ansible Quality Score] ( https://img.shields.io/ansible/quality/56847 )] ( https://galaxy.ansible.com/lotusnoir/apps_wazuh_agent )
10
10
[ ![ License] ( https://img.shields.io/badge/license-Apache--2.0-brightgreen?style=flat )] ( https://opensource.org/licenses/Apache-2.0 )
11
11
12
12
Install and configure wazuh_agent
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : restart wazuh-agent
3
- service : name=wazuh-agent state=restarted
3
+ ansible.builtin. service : name=wazuh-agent state=restarted
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ galaxy_info:
11
11
versions :
12
12
- " focal"
13
13
- " bionic"
14
+ - " jammy"
14
15
- name : " Debian"
15
16
versions :
16
17
- " bullseye"
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ platforms:
20
20
- /sys/fs/cgroup:/sys/fs/cgroup:ro
21
21
groups :
22
22
- python3
23
+ - name : ubuntu22-apps-wazuh-agent
24
+ pre_build_image : true
25
+ image : lotusnoir/ansible_molecule_test_images:ubuntu22
26
+ docker_host : " ${DOCKER_HOST:-unix://var/run/docker.sock}"
27
+ privileged : true
28
+ volumes :
29
+ - /sys/fs/cgroup:/sys/fs/cgroup:ro
30
+ groups :
31
+ - python3
23
32
- name : debian10-apps-wazuh-agent
24
33
pre_build_image : true
25
34
image : lotusnoir/ansible_molecule_test_images:debian10
@@ -41,15 +50,6 @@ platforms:
41
50
privileged : true
42
51
volumes :
43
52
- /sys/fs/cgroup:/sys/fs/cgroup:ro
44
- - name : centos8-apps-wazuh-agent
45
- pre_build_image : true
46
- image : lotusnoir/ansible_molecule_test_images:centos8
47
- docker_host : " ${DOCKER_HOST:-unix://var/run/docker.sock}"
48
- privileged : true
49
- volumes :
50
- - /sys/fs/cgroup:/sys/fs/cgroup:ro
51
- groups :
52
- - python3
53
53
- name : rocky8-apps-wazuh-agent
54
54
pre_build_image : true
55
55
image : lotusnoir/ansible_molecule_test_images:rocky8
Original file line number Diff line number Diff line change 1
1
---
2
2
# ## INCLUDE META
3
3
- name : Include roles' meta data
4
- include_vars :
4
+ ansible.builtin. include_vars :
5
5
file : " {{ role_path }}/meta/main.yml"
6
6
7
7
# ## TEST DISTRIB
8
8
- name : Test the distribution is supported. End the host if not.
9
- set_fact :
9
+ ansible.builtin. set_fact :
10
10
supported_distributions : " {{ galaxy_info.platforms|json_query('[].name') }}"
11
- - block :
11
+ - name : Exit conditions
12
+ block :
12
13
- name : Ending play...
13
- debug :
14
+ ansible.builtin. debug :
14
15
msg : " {{ ansible_distribution }} not supported. End of host."
15
16
- name : Ending play...
16
- meta : end_host
17
+ ansible.builtin. meta : end_host
17
18
when : ansible_distribution not in supported_distributions
18
19
19
20
# ## TEST RELEASE
20
21
- name : Test the release is supported. End the host if not.
21
- set_fact :
22
+ ansible.builtin. set_fact :
22
23
supported_releases : " {{ (galaxy_info.platforms| selectattr('name', 'match', ansible_distribution)| list|first).versions }}"
23
- - block :
24
+ - name : Exit conditions
25
+ block :
24
26
- name : Ending play...
25
- debug :
27
+ ansible.builtin. debug :
26
28
msg : " {{ ansible_distribution_release }} not supported. End of host."
27
29
- name : Ending play...
28
- meta : end_host
30
+ ansible.builtin. meta : end_host
29
31
when : ansible_distribution_release not in supported_releases and ansible_distribution_major_version not in supported_releases
30
32
31
33
- name : The distribution and release is supported. Continue play.
32
- debug :
34
+ ansible.builtin. debug :
33
35
msg : " {{ ansible_distribution }} {{ ansible_distribution_release }} is supported. Continue play."
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " RedHat | Install wazuh-agent"
3
- include_tasks : setup-RedHat.yml
3
+ ansible.builtin. include_tasks : setup-RedHat.yml
4
4
when : ansible_os_family == "RedHat" or ansible_os_family == "Rocky"
5
5
6
6
- name : " Debian | Install wazuh-agent"
7
- include_tasks : setup-Debian.yml
7
+ ansible.builtin. include_tasks : setup-Debian.yml
8
8
when : ansible_os_family == "Debian"
9
9
10
10
- name : " Start wazuh-agent"
11
- service :
11
+ ansible.builtin. service :
12
12
name : wazuh-agent
13
13
state : started
14
14
enabled : true
Original file line number Diff line number Diff line change 1
1
---
2
2
# ## Checks
3
3
- name : Import check tasks
4
- import_tasks : check.yml
4
+ ansible.builtin. import_tasks : check.yml
5
5
6
6
# ## Import vars
7
7
- name : add OS specific variables
8
- include_vars : ' {{ vars_file }}'
8
+ ansible.builtin. include_vars : ' {{ vars_file }}'
9
9
with_first_found :
10
10
- files :
11
11
- ' {{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml'
19
19
20
20
# ## Install
21
21
- name : Import install tasks
22
- import_tasks : install.yml
22
+ ansible.builtin. import_tasks : install.yml
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " Debian | Install gnupg"
3
- package :
3
+ ansible.builtin. package :
4
4
name : " gnupg"
5
5
state : present
6
6
7
7
- name : " Debian | Add wazuh apt signing key"
8
- apt_key :
8
+ ansible.builtin. apt_key :
9
9
url : https://packages.wazuh.com/key/GPG-KEY-WAZUH
10
10
state : present
11
11
12
12
- name : " Debian | Add wazuh repo to apt list"
13
- apt_repository :
13
+ ansible.builtin. apt_repository :
14
14
repo : deb https://packages.wazuh.com/4.x/apt/ stable main
15
15
state : present
16
16
filename : wazuh
17
17
18
18
- name : " Debian | Install wazuh-agent package"
19
- package :
19
+ ansible.builtin. package :
20
20
name : " wazuh-agent"
21
21
state : present
22
22
update_cache : ' yes'
Original file line number Diff line number Diff line change 1
1
---
2
- - name : Redhat | Import a key from a url
3
- rpm_key :
2
+ - name : " Redhat | Import a key from a url"
3
+ ansible.builtin. rpm_key :
4
4
state : present
5
5
key : https://packages.wazuh.com/key/GPG-KEY-WAZUH
6
6
7
- - name : Redhat | Copy repo informations
8
- copy :
7
+ - name : " Redhat | Copy repo informations"
8
+ ansible.builtin. copy :
9
9
dest : /etc/yum.repos.d/wazuh.repo
10
10
content : |
11
11
[wazuh_repo]
17
17
protect=1
18
18
mode : ' 0644'
19
19
20
- - name : Redhat | Install wazuh-agent package
21
- dnf :
20
+ - name : " Redhat | Install wazuh-agent package"
21
+ ansible.builtin. dnf :
22
22
name : wazuh-agent
23
23
state : present
24
24
environment :
You can’t perform that action at this time.
0 commit comments