Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTT1 - Iteration 3 - Test module - Improve Wazuh agent tests #4843

Closed
6 tasks done
Tracked by #4848
QU3B1M opened this issue Jan 16, 2024 · 30 comments · Fixed by #4998
Closed
6 tasks done
Tracked by #4848

DTT1 - Iteration 3 - Test module - Improve Wazuh agent tests #4843

QU3B1M opened this issue Jan 16, 2024 · 30 comments · Fixed by #4998
Assignees

Comments

@QU3B1M
Copy link
Member

QU3B1M commented Jan 16, 2024

Epic #4495

Description

This issue aims to improve and complete the wazuh-agent tests generated in the first iterations of DTT1

Tasks

  • Test install - Add checkfiles close-word
  • Test registration - Add validations through Wazuh API
  • Test restart - Add validations through Wazuh API
  • Test stop - Validate process and services
  • Test uninstall - Expect the agent uninstalled by the provision module & validate process and services
  • Test in AWS EC2 instances
@QU3B1M QU3B1M added level/task Task issue type/enhancement level/subtask Subtask issue and removed level/task Task issue labels Jan 16, 2024
@QU3B1M QU3B1M self-assigned this Jan 17, 2024
@QU3B1M
Copy link
Member Author

QU3B1M commented Jan 17, 2024

Update report

Created a small library to handle WazuhAPI requests and responses with the purpose of simplifying the API testing for current and future tests. The library contains three files and for now is included inside the tests helpers, later, if its approved it could be configured to be an installable library.

Files:

  • endpoints.py - Lists all the WazuhAPI endpoints used by the library

    #   - Wazuh API endpoints
    
    # -- Security --
    SECURITY = '/security'
    # Users
    SECURITY_USER = f'{SECURITY}/user'
    SECURITY_USERS = f'{SECURITY}/users'
    # Authentication
    SECURITY_AUTHENTICATE = f'{SECURITY_USER}/authenticate'
    # Configuration
    SECURITY_CONFIG = f'{SECURITY}/config'
    
    # -- Groups --
    GROUPS = '/groups'
    
    # -- Agents --
    AGENTS = '/agents'
    AGENTS_GROUP = f'{AGENTS}/group'
  • exceptions.py - Defines exceptions to be raised by the library corresponding to failing status codes

    from requests import RequestException
    
    
    
    class BadRequest(RequestException):
        """A bad request error occurred."""
    
    
    class Unauthorized(RequestException):
        """An unauthorized error occurred."""
    
    
    class Forbidden(RequestException):
        """A forbidden error occurred."""
    
    
    class NotFound(RequestException):
        """A not found error occurred."""
    
    
    class MethodNotAllowed(RequestException):
        """A method not allowed error occurred."""
    
    
    class TooManyRequests(RequestException):
        """A request limit exceeded error occurred."""
    
    
    class InternalServerError(RequestException):
        """An internal server error occurred."""
    
    
    class ServiceUnavailable(RequestException):
        """A service unavailable error occurred."""
    
    
    class GatewayTimeout(RequestException):
        """A gateway timeout error occurred."""
    
    
    responses_errors = {
        400: BadRequest,
        401: Unauthorized,
        403: Forbidden,
        404: NotFound,
        405: MethodNotAllowed,
        429: TooManyRequests,
        500: InternalServerError,
        501: ServiceUnavailable,
        503: GatewayTimeout
    }
  • api.py - The main file of the library where the class WazuhAPI resides.

    import requests
    
    from datetime import datetime, timedelta
    
    from .exceptions import responses_errors
    from . import endpoints
    
    
    class WazuhAPI:
    
        def __init__(self, user: str, password: str, host: str = 'localhost', port: int = 55000) -> None:
            self.user = user
            self.password = password
            self.host = host
            self.port = port
            # Token default values
            self.token = None
            self.token_lifetime = 900
            self.token_expiration = None
            # Create a requests session and disable the warnings
            self.session = requests.Session()
            requests.packages.urllib3.disable_warnings()
            # Authenticate and save the token value and expiration
            self.authenticate()
    
        # Security
    
        def authenticate(self) -> str:
            endpoint = self._get_complete_url(endpoints.SECURITY_AUTHENTICATE)
            credentials = (self.user, self.password)
            # _send_request is not used here because of the auth parameter.
            response = self.session.get(endpoint, auth=credentials, verify=False)
            if response.status_code in responses_errors.keys():
                print(f'Authentication error: {response.content}')
                raise responses_errors[response.status_code]
            self.token_expiration = datetime.now() + timedelta(seconds=self.token_lifetime)
            self.token = response.json()['data']['token']
    
        def extend_token_life(self, timeout: int = 99999999) -> dict:
            endpoint = self._get_complete_url(endpoints.SECURITY_CONFIG)
            payload = {"auth_token_exp_timeout": timeout, "rbac_mode": "white"}
            response = self._send_request('put', endpoint, payload=payload)
            self.token_lifetime = timeout
            return response
    
        # Agents
    
        def add_agent(self, name: str, ip: str) -> dict:
            endpoint = self._get_complete_url(endpoints.AGENTS)
            payload = {'name': name, 'ip': ip}
            return self._send_request('post', endpoint, payload=payload)
    
        def get_agent(self, agent_id: str) -> dict:
            endpoint = self._get_complete_url(endpoints.AGENTS)
            params = {'agents_list': [agent_id]}
            response = self._send_request('get', endpoint, query_params=params)
            return response[0] if response else {}
    
        def get_agents(self, **kwargs: dict) -> list[dict]:
            endpoint = self._get_complete_url(endpoints.AGENTS)
            return self._send_request('get', endpoint, query_params=kwargs)
    
        def delete_agent(self, agent_id: str) -> dict:
            endpoint = self._get_complete_url(endpoints.AGENTS)
            params = {'agents_list': [agent_id], 'status': 'all'}
            return self._send_request('delete', endpoint, query_params=params)
    
        def delete_agents(self, agents_list: list, **kwargs: dict) -> dict:
            endpoint = self._get_complete_url(endpoints.AGENTS)
            params = {**kwargs, 'agents_list': agents_list}
            return self._send_request('delete', endpoint, query_params=params)
    
        # --- INTERNAL METHODS ---
    
        def _send_request(self, method: str, endpoint: str, payload: dict = None, query_params: dict = {}) -> dict:
            if not self.token:
                self.authenticate()
            elif self.token_expiration <= datetime.now():
                self.authenticate()
            # Set the headers and send the request
            headers = {'Authorization': f'Bearer {self.token}'}
            query_params['pretty'] = 'true'
            response = self.session.request(
                method, endpoint, data=payload, headers=headers, params=query_params, verify=False)
            # Check if the response is an error
            if response.status_code in responses_errors.keys():
                print(f'Failing request to: {endpoint}\nError: {response.content}')
                raise responses_errors[response.status_code]
            return response.json().get('data', {}).get('affected_items', {})
    
        def _get_complete_url(self, endpoint) -> str:
            if endpoint.startswith('/'):
                endpoint = endpoint[1:]
            return f'https://{self.host}:{self.port}/{endpoint}'

@QU3B1M
Copy link
Member Author

QU3B1M commented Jan 19, 2024

Update report

About check-files on test Install:

In the current approach the provision module is in charge of installing the wazuh-agent, so there is no easy way to take a snapshot of the system files before and after the installation to validate for changes.

If we want to maintain the test "simple" and "modularized" to only do validations, we won't be able to do the check-files, at least with the desired approach.

@fcaffieri
Copy link
Member

Review

All test LGTM

The item Test install - Add checkfiles close-word will be analyzed and discussed with @davidjiglesias and then the appropriate implementation since the current implementation is not valid.

@pro-akim
Copy link
Member

Update

In the evaluation and development of the best model for performing checkfiles

@wazuhci wazuhci moved this from In progress to Blocked in Release 4.9.0 Jan 30, 2024
@wazuhci wazuhci moved this from Blocked to In progress in Release 4.9.0 Feb 13, 2024
@pro-akim
Copy link
Member

pro-akim commented Feb 13, 2024

Update

First of all, it was determined in the discussion with the team that the installation and uninstallation tests should consider the installation and uninstallation of components within the test module itself.

On the other hand, we will investigate how to instrument the checkfile.

Steps to follow:

  • Research about check-files
  • Define tests that will be done and their sequence of action
  • Research actions
  • Define functions to install, uninstall and checkfiles depending on the OS => Create a list of actions and their variations
  • Apply all (includes parametrization)
  • Test

Research about check-files

It is clear that to achieve the check-file, we will have to take a snapshot of the directories and files before and after the 'action'.

Linux/MacOS Options
  • Directory and files
find {directory_path} -type f -o -type d | wc -l
  • Only directory
find {directory_path} -type d | wc -l
  • Only files
find {directory_path} -type f | wc -l
  • Permissions
find {directory_path} -type f -o -type d -exec stat -c '%a' {} \; | sort | uniq -c
Windows Options
  • Only files (only works in cmd)
dir /a-d /b /s | findstr /v /c:"\\.$" /c:"\\..$"| find /c ":"
  • Only files (only works in powershell)
(Get-ChildItem -File -Recurse | Where-Object { $_.FullName -notmatch '\\\.$' -and $_.FullName -notmatch '\\\.\.$' }).Count

Define tests that will be done and their sequence of action

  1. [install]
  2. [register]
  3. basic_info
  4. repo
  5. connection
  6. stop
  7. restart
  8. [uninstall]

Reference:
[] : fixed positions.
The rest of the test can change the order.

Install and uninstall should be the start and the end of the sequence.

If the workflow does not require the install and the register, this should be done implicitly by the provision module without the validations of the stages.

In case the install and the register are not required by the user, the test will fail due to a lack of agent installation and registration.


Research actions

Agent:

Install

Linux

  • RPM
  • amd64
curl -o wazuh-agent-{ wazuh_version }-{ wazuh_revision }.x86_64.rpm https://{ aws s3 }.wazuh.com/{ repository }/yum/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.x86_64.rpm && sudo WAZUH_MANAGER='{ dependency_ip }' rpm -ihv wazuh-agent-4.7.2-1.x86_64.rpm
  • aarch64
curl -o wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm https://{ aws s3 }.wazuh.com/{ repository }/yum/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm && sudo WAZUH_MANAGER='{ dependency_ip }' rpm -ihv wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm
  • DEB
  • amd64
wget https://https://{ aws s3 }.wazuh.com/{ repository }/apt/pool/main/w/wazuh-agent/wazuh-agent_{ wazuh_version }-{ wazuh_revision }_amd64.deb && sudo WAZUH_MANAGER='{ dependency_ip }' dpkg -i ./wazuh-agent_{ wazuh_version }-{ wazuh_revision }_amd64.deb
  • aarch64
wget https://https://{ aws s3 }.wazuh.com/{ repository }/apt/pool/main/w/wazuh-agent/wazuh-agent_{ wazuh_version }-{ wazuh_revision }_arm64.deb && sudo WAZUH_MANAGER='{ dependency_ip }' dpkg -i ./wazuh-agent_{ wazuh_version }-{ wazuh_revision }_arm64.deb

After install the agent, in all linux OS:

sudo systemctl daemon-reload
sudo systemctl enable wazuh-agent
sudo systemctl start wazuh-agent

Windows

Invoke-WebRequest -Uri https://https://{ aws s3 }.wazuh.com/{ repository }/windows/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.msi -OutFile ${env.tmp}\wazuh-agent; msiexec.exe /i ${env.tmp}\wazuh-agent /q WAZUH_MANAGER='{ dependency_ip }' WAZUH_REGISTRATION_SERVER='{ dependency_ip }' 

After install the agent, in all Windows OS:

NET START WazuhSvc

MacOS

  • Intel
curl -so wazuh-agent.pkg https://https://{ aws s3 }.wazuh.com/{ repository }/macos/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.intel64.pkg && echo "WAZUH_MANAGER='{ dependency_ip }'" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /
  • Apple Silicon
curl -so wazuh-agent.pkg https://https://{ aws s3 }.wazuh.com/{ repository }/macos/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.arm64.pkg && echo "WAZUH_MANAGER='{ dependency_ip }'" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /

After install the agent, in all MacOS OS:

sudo /Library/Ossec/bin/wazuh-control start
Uninstall

Linux

yum remove wazuh-agent
apt-get remove wazuh-agent
apt-get remove --purge wazuh-agent

After uninstall the agent, in all linux OS:

systemctl disable wazuh-agent
systemctl daemon-reload

Windows

msiexec.exe /x wazuh-agent-{ wazuh_version }-{ wazuh_revision }.msi /qn

MacOS

/Library/Ossec/bin/wazuh-control stop
/bin/rm -r /Library/Ossec
/bin/launchctl unload /Library/LaunchDaemons/com.wazuh.agent.plist
/bin/rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
/bin/rm -rf /Library/StartupItems/WAZUH
/usr/bin/dscl . -delete "/Users/wazuh"
/usr/bin/dscl . -delete "/Groups/wazuh"
/usr/sbin/pkgutil --forget com.wazuh.pkg.wazuh-agent

@pro-akim
Copy link
Member

pro-akim commented Feb 13, 2024

Update

Notes

  1. Without the provision, the agent host does not have pip, pytest, and basic libraries installed.

Note: The main issue with this is that the installation of pytest will have to be handled by external code outside the test file.

This issue was fixed by adding setup steps to playbooks/setup.yml

  1. Installation code could be repetitive due to the amount of OS involved.
  2. Parameters to install should be sent from the command.
  3. Without the provision module working, the manager is not installed as well.

Filecheck

Working with a file and directory counter in a large directory can pose challenges. Other modifications may result in alterations to the count, leading to the possibility of false negatives in the test.

It will be necessary to establish pre and post-installation validation criteria.


After communicating with @fcaffieri , it was defined that the Filecheck should be global.

Doing some research, the following method was found:

Script
import os
import hashlib

def scan_directory(directory):
    file_list = []
    for root, dirs, files in os.walk(directory):
        for file in files:
            file_path = os.path.join(root, file)
            file_list.append((file_path, get_file_hash(file_path)))
    return file_list

def get_file_hash(file_path):
    hasher = hashlib.md5()
    if os.path.exists(file_path):
        try:
            with open(file_path, 'rb') as f:
                while chunk := f.read(8192):
                    hasher.update(chunk)
        except OSError as e:
            print(f"Failure opening the file {file_path}: {e}")
    else:
        print(f"The {file_path} does not exist.")
        return None
    return hasher.hexdigest()

def compare_directories(old_scan, new_scan):
    changed_files = []

    # Identify modified and added files
    for new_file, new_hash in new_scan:
        file_found = False
        for old_file, old_hash in old_scan:
            if os.path.relpath(old_file) == os.path.relpath(new_file):
                file_found = True
                if old_hash != new_hash:
                    changed_files.append((new_file, old_hash, new_hash))

        # If the file is not found in the initial scan, consider it added
        if not file_found:
            changed_files.append((new_file, 'Added', new_hash))

    # Identify deleted files
    for old_file, _ in old_scan:
        if os.path.relpath(old_file) not in (os.path.relpath(new_file) for new_file, _ in new_scan):
            changed_files.append((old_file, 'Deleted', None))

    return changed_files
Installation test:
    Initial scan:
    []
    Failure opening the file /var/ossec/queue/sockets/wmodules: [Errno 6] No such device or address: '/var/ossec/queue/sockets/wmodules'
    Failure opening the file /var/ossec/queue/sockets/control: [Errno 6] No such device or address: '/var/ossec/queue/sockets/control'
    Failure opening the file /var/ossec/queue/sockets/com: [Errno 6] No such device or address: '/var/ossec/queue/sockets/com'
    Failure opening the file /var/ossec/queue/sockets/upgrade: [Errno 6] No such device or address: '/var/ossec/queue/sockets/upgrade'
    Failure opening the file /var/ossec/queue/sockets/queue: [Errno 6] No such device or address: '/var/ossec/queue/sockets/queue'
    Failure opening the file /var/ossec/queue/sockets/logcollector: [Errno 6] No such device or address: '/var/ossec/queue/sockets/logcollector'
    Failure opening the file /var/ossec/queue/sockets/syscheck: [Errno 6] No such device or address: '/var/ossec/queue/sockets/syscheck'
    Failure opening the file /var/ossec/queue/alerts/cfgaq: [Errno 6] No such device or address: '/var/ossec/queue/alerts/cfgaq'
    Failure opening the file /var/ossec/queue/alerts/execq: [Errno 6] No such device or address: '/var/ossec/queue/alerts/execq'
  
    Post scan:
    [('/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', '0a340a61595e3b6cfb8a863ed63df4ea'), ('/var/ossec/wodles/utils.py', 'cbbf34017bcf23ae914f313cbba81d2b'), ('/var/ossec/wodles/__init__.py', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/wodles/aws/aws-s3', '003e541daab44ae4b9b22e8bedc0431f'), ('/var/ossec/wodles/azure/orm.py', 'bdcd7e6087d33c2f267153eedc919c56'), ('/var/ossec/wodles/azure/azure-logs', '92065f2e7cc54d27a915d47002b2c796'), ('/var/ossec/wodles/docker/DockerListener', '7141e875ba042b5ee6ca39ee4a69bd0f'), ('/var/ossec/wodles/gcloud/exceptions.py', 'd066fa7028799eea3cf8f58c4f7ac020'), ('/var/ossec/wodles/gcloud/integration.py', 'c9ae089a1b6d28dcd1b1dccacfa5095e'), ('/var/ossec/wodles/gcloud/tools.py', '70d2049b23778b5215d91e49def2799d'), ('/var/ossec/wodles/gcloud/gcloud', '1bed986d1318be9f0d399d8e429fd876'), ('/var/ossec/wodles/gcloud/pubsub/subscriber.py', '8d365d4754764c66235b2af5ca58af7a'), ('/var/ossec/wodles/gcloud/buckets/bucket.py', 'a4d2fbd2412d90112c9a0302c3f53f3c'), ('/var/ossec/wodles/gcloud/buckets/access_logs.py', 'cee4cc3b83f42efcdcde8f6298799fd7'), ('/var/ossec/var/run/wazuh-logcollector-101612.pid', '34e2e0e98ced664e5a7e0d9f7d8106af'), ('/var/ossec/var/run/wazuh-agentd.state', '5cbb71ebd4a652478fc76b93f98e9dfb'), ('/var/ossec/var/run/wazuh-agentd-101586.pid', 'a4b65f1ffd176ecbb5cb4d5f5e3dd258'), ('/var/ossec/var/run/wazuh-modulesd-101629.pid', 'd15ce02be4d86a0467f02be97eb6ff05'), ('/var/ossec/var/run/wazuh-syscheckd-101599.pid', 'c6b40711dd20f6477df192c73a206cff'), ('/var/ossec/var/run/wazuh-execd-101575.pid', 'ea32f2821522ec391a789d9086f1f35a'), ('/var/ossec/var/selinux/wazuh.pp', '61a28e46f03851cfdbc073f0c1e35819'), ('/var/ossec/agentless/register_host.sh', '08081346dc3fd761459b8bc9623e10da'), ('/var/ossec/agentless/ssh_integrity_check_linux', '7b0a58db243828e33f8cec11d382ab55'), ('/var/ossec/agentless/ssh_asa-fwsmconfig_diff', '168da17a073de01628ebdce9362c363c'), ('/var/ossec/agentless/sshlogin.exp', '8282404ed50ea7ad514ed1dc3bf05c17'), ('/var/ossec/agentless/ssh_foundry_diff', '32bb3e1ffb32a85288c9a18d7f24c555'), ('/var/ossec/agentless/ssh_generic_diff', '2869159008062183940a4cbf655a7b12'), ('/var/ossec/agentless/main.exp', 'dae474002ee16b821fa7716a4c2e306b'), ('/var/ossec/agentless/su.exp', '050fd94bee6780f951e477ca4e7875d6'), ('/var/ossec/agentless/ssh.exp', '2cf3022d233e5c434069654871bf22c5'), ('/var/ossec/agentless/ssh_pixconfig_diff', 'c31d904b727eb3fb683c9327aee68d10'), ('/var/ossec/agentless/ssh_nopass.exp', '2680a87d230c0f1fce2bec4546f0c1c7'), ('/var/ossec/agentless/ssh_integrity_check_bsd', '464b39d3a34b050af5e6c0de23e74b50'), ('/var/ossec/bin/wazuh-control', '17ab4d1f4d07e138fc44279b371362ce'), ('/var/ossec/bin/agent-auth', 'fc2b4be54ddf207d267777fa2b9ea4e5'), ('/var/ossec/bin/wazuh-agentd', '5335a40690ae96f5fb35b04760bd1408'), ('/var/ossec/bin/wazuh-logcollector', '4387241256aafb643eb239b2e5bb83e7'), ('/var/ossec/bin/wazuh-modulesd', '0ff739f142d4fe55aaa1793a2c9d9830'), ('/var/ossec/bin/manage_agents', '0f83e5799269ecb2a7496f399ba884bc'), ('/var/ossec/bin/wazuh-syscheckd', '270e2fb8a30db5edd62987be4691bc01'), ('/var/ossec/bin/wazuh-execd', '38b4ca78d0dc4a97e52ec697d8830352'), ('/var/ossec/lib/libsysinfo.so', '0e3f0be4e9c336be798266803939c648'), ('/var/ossec/lib/libstdc++.so.6', '45cacd641807d3ae8b0652edaa4a3d05'), ('/var/ossec/lib/libwazuhshared.so', 'a04f564d52af96ee22de2126982ce2bd'), ('/var/ossec/lib/libfimdb.so', 'bfedab21253c88257020d4fa45de3ba5'), ('/var/ossec/lib/libsyscollector.so', 'ac7bec3a13951d9a02516d95304b1347'), ('/var/ossec/lib/librsync.so', '9b5aedc37feef205f42587d6d1ae6ce6'), ('/var/ossec/lib/libwazuhext.so', 'b1af037c67307d72caa959346e0c4bce'), ('/var/ossec/lib/libgcc_s.so.1', '2dc0d65eb50278e2eae1519d17a7b764'), ('/var/ossec/lib/libdbsync.so', '7dc8363c9f41e566f5509ffc4d1c5ca9'), ('/var/ossec/etc/client.keys', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/etc/localtime', '38bb24ba4d742dd6f50c1cba29cd966a'), ('/var/ossec/etc/wpk_root.pem', '62a376c2059a97b26415040cf51ffed9'), ('/var/ossec/etc/local_internal_options.conf', '02d970a0df2e22fd0c6cca597d3eff97'), ('/var/ossec/etc/internal_options.conf', '0e4bc89fe0dc133908ada6f3e4078fed'), ('/var/ossec/etc/ossec.conf', 'e8eb1ae42aa07fcbecb77cffa7583eb3'), ('/var/ossec/etc/shared/rootkit_trojans.txt', '0f4ccc3a78b7989644d0d85b2a888a6b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', '39fec042d6f9f68ae6ed6837dd9d36ce'), ('/var/ossec/etc/shared/win_audit_rcl.txt', '7081a34961d9d0244a0238d4000b9821'), ('/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', '287276a269d9d412229e06e6aae19aa3'), ('/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', '23f48bac6361e28e3cfe9dae65d9cdb7'), ('/var/ossec/etc/shared/win_malware_rcl.txt', 'dce0fd97a51f6a03ee2529c9a7c78fc0'), ('/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', 'b774694648d06196c62f18b65c6ae362'), ('/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', '5cc644ed02a62341960fd46d50e30399'), ('/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', '732e1cc44433ecd8c13be1b6967eaabc'), ('/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', '80c48eb8d9fc25a2bf19f1538d4dc11a'), ('/var/ossec/etc/shared/system_audit_ssh.txt', 'd6384ddcd72864a14bc73e433e3aaf17'), ('/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', 'fdc029f8b838b55395ca317cc4e2bb16'), ('/var/ossec/etc/shared/cis_apache2224_rcl.txt', '8b74055e0b72ad5e06dc0468f4e992ef'), ('/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', '7331ea6f235ad8cee69441df3a0a94d1'), ('/var/ossec/etc/shared/win_applications_rcl.txt', 'ea5686ce6eafe5268bdba42ea367ec17'), ('/var/ossec/etc/shared/system_audit_rcl.txt', 'cf63d35a9e7ffdf943c41894f0598f0f'), ('/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', '7621888a614065f8a80d3e243f6dd0b2'), ('/var/ossec/etc/shared/cis_debian_linux_rcl.txt', '52bca6f514fede26c4edaf3112614447'), ('/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', 'e823532eaa108671cbcb0bf4c687dd8b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', '21580a5bd6fa4362deba1070613032d1'), ('/var/ossec/etc/shared/rootkit_files.txt', '6943964a87d768d8434fffbaceda89f2'), ('/var/ossec/active-response/bin/firewall-drop', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/kaspersky.py', '0c32c5d717983a7f03b32b0d4c6d6e43'), ('/var/ossec/active-response/bin/route-null', 'a89fd52f702955e40babb75ff3ef35b8'), ('/var/ossec/active-response/bin/restart-wazuh', 'abbc5ba7dc7c562bcebd7472f5962404'), ('/var/ossec/active-response/bin/ip-customblock', '920d56367df65c4f1aeede8519a8d070'), ('/var/ossec/active-response/bin/firewalld-drop', '2bfc1e923124f06478a3e4ddd39587fb'), ('/var/ossec/active-response/bin/default-firewall-drop', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/pf', '416b5f7e00a4da47e9253aa7d8b768d9'), ('/var/ossec/active-response/bin/restart.sh', '238d4466f70e8140d7dfdf741a84e5ac'), ('/var/ossec/active-response/bin/host-deny', '2662a6a926679aba40aa544da1d39cad'), ('/var/ossec/active-response/bin/ipfw', 'b668b777a52e33485811faae0f02a394'), ('/var/ossec/active-response/bin/disable-account', 'b6e09410d2fbc3f2e1c16d0c0ce973e4'), ('/var/ossec/active-response/bin/wazuh-slack', 'ce42ff5cd35b731db96a3a3f286e52eb'), ('/var/ossec/active-response/bin/npf', '49435a5d10fa00de55d3e7540a48bf1e'), ('/var/ossec/active-response/bin/kaspersky', 'f613e4a90a6230cb6f8916d518fad2f0'), ('/var/ossec/logs/active-responses.log', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/logs/ossec.log', 'f82592b11e40d7393d1b17cf9d233f5b'), ('/var/ossec/queue/syscollector/norm_config.json', 'd619e8d5dfab6cbec9c7751bf59254a3'), ('/var/ossec/queue/syscollector/db/local.db-journal', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/syscollector/db/local.db', '7e3805d829ee3b94fade901520fe05d9'), ('/var/ossec/queue/fim/db/fim.db', '6fe93763addfdfe6e5c22c3efe60b66f'), ('/var/ossec/queue/fim/db/fim.db-journal', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/wmodules', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/control', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/com', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/.wait', '2db95e8e1a9267b7a1188556b2013b33'), ('/var/ossec/queue/sockets/upgrade', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/queue', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/logcollector', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/syscheck', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/cfgaq', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/execq', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/logcollector/file_status.json', '590f644afb9d25e3507a00b2a2902e20')]
  
    Detected changes:
    [('/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', 'Added', '0a340a61595e3b6cfb8a863ed63df4ea'), ('/var/ossec/wodles/utils.py', 'Added', 'cbbf34017bcf23ae914f313cbba81d2b'), ('/var/ossec/wodles/__init__.py', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/wodles/aws/aws-s3', 'Added', '003e541daab44ae4b9b22e8bedc0431f'), ('/var/ossec/wodles/azure/orm.py', 'Added', 'bdcd7e6087d33c2f267153eedc919c56'), ('/var/ossec/wodles/azure/azure-logs', 'Added', '92065f2e7cc54d27a915d47002b2c796'), ('/var/ossec/wodles/docker/DockerListener', 'Added', '7141e875ba042b5ee6ca39ee4a69bd0f'), ('/var/ossec/wodles/gcloud/exceptions.py', 'Added', 'd066fa7028799eea3cf8f58c4f7ac020'), ('/var/ossec/wodles/gcloud/integration.py', 'Added', 'c9ae089a1b6d28dcd1b1dccacfa5095e'), ('/var/ossec/wodles/gcloud/tools.py', 'Added', '70d2049b23778b5215d91e49def2799d'), ('/var/ossec/wodles/gcloud/gcloud', 'Added', '1bed986d1318be9f0d399d8e429fd876'), ('/var/ossec/wodles/gcloud/pubsub/subscriber.py', 'Added', '8d365d4754764c66235b2af5ca58af7a'), ('/var/ossec/wodles/gcloud/buckets/bucket.py', 'Added', 'a4d2fbd2412d90112c9a0302c3f53f3c'), ('/var/ossec/wodles/gcloud/buckets/access_logs.py', 'Added', 'cee4cc3b83f42efcdcde8f6298799fd7'), ('/var/ossec/var/run/wazuh-logcollector-101612.pid', 'Added', '34e2e0e98ced664e5a7e0d9f7d8106af'), ('/var/ossec/var/run/wazuh-agentd.state', 'Added', '5cbb71ebd4a652478fc76b93f98e9dfb'), ('/var/ossec/var/run/wazuh-agentd-101586.pid', 'Added', 'a4b65f1ffd176ecbb5cb4d5f5e3dd258'), ('/var/ossec/var/run/wazuh-modulesd-101629.pid', 'Added', 'd15ce02be4d86a0467f02be97eb6ff05'), ('/var/ossec/var/run/wazuh-syscheckd-101599.pid', 'Added', 'c6b40711dd20f6477df192c73a206cff'), ('/var/ossec/var/run/wazuh-execd-101575.pid', 'Added', 'ea32f2821522ec391a789d9086f1f35a'), ('/var/ossec/var/selinux/wazuh.pp', 'Added', '61a28e46f03851cfdbc073f0c1e35819'), ('/var/ossec/agentless/register_host.sh', 'Added', '08081346dc3fd761459b8bc9623e10da'), ('/var/ossec/agentless/ssh_integrity_check_linux', 'Added', '7b0a58db243828e33f8cec11d382ab55'), ('/var/ossec/agentless/ssh_asa-fwsmconfig_diff', 'Added', '168da17a073de01628ebdce9362c363c'), ('/var/ossec/agentless/sshlogin.exp', 'Added', '8282404ed50ea7ad514ed1dc3bf05c17'), ('/var/ossec/agentless/ssh_foundry_diff', 'Added', '32bb3e1ffb32a85288c9a18d7f24c555'), ('/var/ossec/agentless/ssh_generic_diff', 'Added', '2869159008062183940a4cbf655a7b12'), ('/var/ossec/agentless/main.exp', 'Added', 'dae474002ee16b821fa7716a4c2e306b'), ('/var/ossec/agentless/su.exp', 'Added', '050fd94bee6780f951e477ca4e7875d6'), ('/var/ossec/agentless/ssh.exp', 'Added', '2cf3022d233e5c434069654871bf22c5'), ('/var/ossec/agentless/ssh_pixconfig_diff', 'Added', 'c31d904b727eb3fb683c9327aee68d10'), ('/var/ossec/agentless/ssh_nopass.exp', 'Added', '2680a87d230c0f1fce2bec4546f0c1c7'), ('/var/ossec/agentless/ssh_integrity_check_bsd', 'Added', '464b39d3a34b050af5e6c0de23e74b50'), ('/var/ossec/bin/wazuh-control', 'Added', '17ab4d1f4d07e138fc44279b371362ce'), ('/var/ossec/bin/agent-auth', 'Added', 'fc2b4be54ddf207d267777fa2b9ea4e5'), ('/var/ossec/bin/wazuh-agentd', 'Added', '5335a40690ae96f5fb35b04760bd1408'), ('/var/ossec/bin/wazuh-logcollector', 'Added', '4387241256aafb643eb239b2e5bb83e7'), ('/var/ossec/bin/wazuh-modulesd', 'Added', '0ff739f142d4fe55aaa1793a2c9d9830'), ('/var/ossec/bin/manage_agents', 'Added', '0f83e5799269ecb2a7496f399ba884bc'), ('/var/ossec/bin/wazuh-syscheckd', 'Added', '270e2fb8a30db5edd62987be4691bc01'), ('/var/ossec/bin/wazuh-execd', 'Added', '38b4ca78d0dc4a97e52ec697d8830352'), ('/var/ossec/lib/libsysinfo.so', 'Added', '0e3f0be4e9c336be798266803939c648'), ('/var/ossec/lib/libstdc++.so.6', 'Added', '45cacd641807d3ae8b0652edaa4a3d05'), ('/var/ossec/lib/libwazuhshared.so', 'Added', 'a04f564d52af96ee22de2126982ce2bd'), ('/var/ossec/lib/libfimdb.so', 'Added', 'bfedab21253c88257020d4fa45de3ba5'), ('/var/ossec/lib/libsyscollector.so', 'Added', 'ac7bec3a13951d9a02516d95304b1347'), ('/var/ossec/lib/librsync.so', 'Added', '9b5aedc37feef205f42587d6d1ae6ce6'), ('/var/ossec/lib/libwazuhext.so', 'Added', 'b1af037c67307d72caa959346e0c4bce'), ('/var/ossec/lib/libgcc_s.so.1', 'Added', '2dc0d65eb50278e2eae1519d17a7b764'), ('/var/ossec/lib/libdbsync.so', 'Added', '7dc8363c9f41e566f5509ffc4d1c5ca9'), ('/var/ossec/etc/client.keys', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/etc/localtime', 'Added', '38bb24ba4d742dd6f50c1cba29cd966a'), ('/var/ossec/etc/wpk_root.pem', 'Added', '62a376c2059a97b26415040cf51ffed9'), ('/var/ossec/etc/local_internal_options.conf', 'Added', '02d970a0df2e22fd0c6cca597d3eff97'), ('/var/ossec/etc/internal_options.conf', 'Added', '0e4bc89fe0dc133908ada6f3e4078fed'), ('/var/ossec/etc/ossec.conf', 'Added', 'e8eb1ae42aa07fcbecb77cffa7583eb3'), ('/var/ossec/etc/shared/rootkit_trojans.txt', 'Added', '0f4ccc3a78b7989644d0d85b2a888a6b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', 'Added', '39fec042d6f9f68ae6ed6837dd9d36ce'), ('/var/ossec/etc/shared/win_audit_rcl.txt', 'Added', '7081a34961d9d0244a0238d4000b9821'), ('/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', 'Added', '287276a269d9d412229e06e6aae19aa3'), ('/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', 'Added', '23f48bac6361e28e3cfe9dae65d9cdb7'), ('/var/ossec/etc/shared/win_malware_rcl.txt', 'Added', 'dce0fd97a51f6a03ee2529c9a7c78fc0'), ('/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', 'Added', 'b774694648d06196c62f18b65c6ae362'), ('/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', 'Added', '5cc644ed02a62341960fd46d50e30399'), ('/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', 'Added', '732e1cc44433ecd8c13be1b6967eaabc'), ('/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', 'Added', '80c48eb8d9fc25a2bf19f1538d4dc11a'), ('/var/ossec/etc/shared/system_audit_ssh.txt', 'Added', 'd6384ddcd72864a14bc73e433e3aaf17'), ('/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', 'Added', 'fdc029f8b838b55395ca317cc4e2bb16'), ('/var/ossec/etc/shared/cis_apache2224_rcl.txt', 'Added', '8b74055e0b72ad5e06dc0468f4e992ef'), ('/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', 'Added', '7331ea6f235ad8cee69441df3a0a94d1'), ('/var/ossec/etc/shared/win_applications_rcl.txt', 'Added', 'ea5686ce6eafe5268bdba42ea367ec17'), ('/var/ossec/etc/shared/system_audit_rcl.txt', 'Added', 'cf63d35a9e7ffdf943c41894f0598f0f'), ('/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', 'Added', '7621888a614065f8a80d3e243f6dd0b2'), ('/var/ossec/etc/shared/cis_debian_linux_rcl.txt', 'Added', '52bca6f514fede26c4edaf3112614447'), ('/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', 'Added', 'e823532eaa108671cbcb0bf4c687dd8b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', 'Added', '21580a5bd6fa4362deba1070613032d1'), ('/var/ossec/etc/shared/rootkit_files.txt', 'Added', '6943964a87d768d8434fffbaceda89f2'), ('/var/ossec/active-response/bin/firewall-drop', 'Added', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/kaspersky.py', 'Added', '0c32c5d717983a7f03b32b0d4c6d6e43'), ('/var/ossec/active-response/bin/route-null', 'Added', 'a89fd52f702955e40babb75ff3ef35b8'), ('/var/ossec/active-response/bin/restart-wazuh', 'Added', 'abbc5ba7dc7c562bcebd7472f5962404'), ('/var/ossec/active-response/bin/ip-customblock', 'Added', '920d56367df65c4f1aeede8519a8d070'), ('/var/ossec/active-response/bin/firewalld-drop', 'Added', '2bfc1e923124f06478a3e4ddd39587fb'), ('/var/ossec/active-response/bin/default-firewall-drop', 'Added', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/pf', 'Added', '416b5f7e00a4da47e9253aa7d8b768d9'), ('/var/ossec/active-response/bin/restart.sh', 'Added', '238d4466f70e8140d7dfdf741a84e5ac'), ('/var/ossec/active-response/bin/host-deny', 'Added', '2662a6a926679aba40aa544da1d39cad'), ('/var/ossec/active-response/bin/ipfw', 'Added', 'b668b777a52e33485811faae0f02a394'), ('/var/ossec/active-response/bin/disable-account', 'Added', 'b6e09410d2fbc3f2e1c16d0c0ce973e4'), ('/var/ossec/active-response/bin/wazuh-slack', 'Added', 'ce42ff5cd35b731db96a3a3f286e52eb'), ('/var/ossec/active-response/bin/npf', 'Added', '49435a5d10fa00de55d3e7540a48bf1e'), ('/var/ossec/active-response/bin/kaspersky', 'Added', 'f613e4a90a6230cb6f8916d518fad2f0'), ('/var/ossec/logs/active-responses.log', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/logs/ossec.log', 'Added', 'f82592b11e40d7393d1b17cf9d233f5b'), ('/var/ossec/queue/syscollector/norm_config.json', 'Added', 'd619e8d5dfab6cbec9c7751bf59254a3'), ('/var/ossec/queue/syscollector/db/local.db-journal', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/syscollector/db/local.db', 'Added', '7e3805d829ee3b94fade901520fe05d9'), ('/var/ossec/queue/fim/db/fim.db', 'Added', '6fe93763addfdfe6e5c22c3efe60b66f'), ('/var/ossec/queue/fim/db/fim.db-journal', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/wmodules', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/control', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/com', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/.wait', 'Added', '2db95e8e1a9267b7a1188556b2013b33'), ('/var/ossec/queue/sockets/upgrade', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/queue', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/logcollector', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/syscheck', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/cfgaq', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/execq', 'Added', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/logcollector/file_status.json', 'Added', '590f644afb9d25e3507a00b2a2902e20')]
Uninstall
    Initial scan:
    [('/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', '0a340a61595e3b6cfb8a863ed63df4ea'), ('/var/ossec/wodles/utils.py', 'cbbf34017bcf23ae914f313cbba81d2b'), ('/var/ossec/wodles/__init__.py', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/wodles/aws/aws-s3', '003e541daab44ae4b9b22e8bedc0431f'), ('/var/ossec/wodles/azure/orm.py', 'bdcd7e6087d33c2f267153eedc919c56'), ('/var/ossec/wodles/azure/azure-logs', '92065f2e7cc54d27a915d47002b2c796'), ('/var/ossec/wodles/docker/DockerListener', '7141e875ba042b5ee6ca39ee4a69bd0f'), ('/var/ossec/wodles/gcloud/exceptions.py', 'd066fa7028799eea3cf8f58c4f7ac020'), ('/var/ossec/wodles/gcloud/integration.py', 'c9ae089a1b6d28dcd1b1dccacfa5095e'), ('/var/ossec/wodles/gcloud/tools.py', '70d2049b23778b5215d91e49def2799d'), ('/var/ossec/wodles/gcloud/gcloud', '1bed986d1318be9f0d399d8e429fd876'), ('/var/ossec/wodles/gcloud/pubsub/subscriber.py', '8d365d4754764c66235b2af5ca58af7a'), ('/var/ossec/wodles/gcloud/buckets/bucket.py', 'a4d2fbd2412d90112c9a0302c3f53f3c'), ('/var/ossec/wodles/gcloud/buckets/access_logs.py', 'cee4cc3b83f42efcdcde8f6298799fd7'), ('/var/ossec/var/run/wazuh-agentd.state', '5cbb71ebd4a652478fc76b93f98e9dfb'), ('/var/ossec/var/run/wazuh-agentd-96953.pid', '43cf03e4c854a6469a761932d5066cea'), ('/var/ossec/var/run/wazuh-execd-96942.pid', 'dec95386b257d04ddfcd8ec6c94cff44'), ('/var/ossec/var/run/wazuh-modulesd-96996.pid', 'fd79ccd01d8888e0a7f089f2b6f238ba'), ('/var/ossec/var/run/wazuh-syscheckd-96966.pid', '859b2f0b00429f54769a817503d08157'), ('/var/ossec/var/run/wazuh-logcollector-96979.pid', '28c848a4761da0fcc600b9786f10341e'), ('/var/ossec/var/run/wazuh-logcollector.state', '402adf3eb133fb411210d0d43eb18df1'), ('/var/ossec/var/selinux/wazuh.pp', '61a28e46f03851cfdbc073f0c1e35819'), ('/var/ossec/agentless/register_host.sh', '08081346dc3fd761459b8bc9623e10da'), ('/var/ossec/agentless/ssh_integrity_check_linux', '7b0a58db243828e33f8cec11d382ab55'), ('/var/ossec/agentless/ssh_asa-fwsmconfig_diff', '168da17a073de01628ebdce9362c363c'), ('/var/ossec/agentless/sshlogin.exp', '8282404ed50ea7ad514ed1dc3bf05c17'), ('/var/ossec/agentless/ssh_foundry_diff', '32bb3e1ffb32a85288c9a18d7f24c555'), ('/var/ossec/agentless/ssh_generic_diff', '2869159008062183940a4cbf655a7b12'), ('/var/ossec/agentless/main.exp', 'dae474002ee16b821fa7716a4c2e306b'), ('/var/ossec/agentless/su.exp', '050fd94bee6780f951e477ca4e7875d6'), ('/var/ossec/agentless/ssh.exp', '2cf3022d233e5c434069654871bf22c5'), ('/var/ossec/agentless/ssh_pixconfig_diff', 'c31d904b727eb3fb683c9327aee68d10'), ('/var/ossec/agentless/ssh_nopass.exp', '2680a87d230c0f1fce2bec4546f0c1c7'), ('/var/ossec/agentless/ssh_integrity_check_bsd', '464b39d3a34b050af5e6c0de23e74b50'), ('/var/ossec/bin/wazuh-control', '17ab4d1f4d07e138fc44279b371362ce'), ('/var/ossec/bin/agent-auth', 'fc2b4be54ddf207d267777fa2b9ea4e5'), ('/var/ossec/bin/wazuh-agentd', '5335a40690ae96f5fb35b04760bd1408'), ('/var/ossec/bin/wazuh-logcollector', '4387241256aafb643eb239b2e5bb83e7'), ('/var/ossec/bin/wazuh-modulesd', '0ff739f142d4fe55aaa1793a2c9d9830'), ('/var/ossec/bin/manage_agents', '0f83e5799269ecb2a7496f399ba884bc'), ('/var/ossec/bin/wazuh-syscheckd', '270e2fb8a30db5edd62987be4691bc01'), ('/var/ossec/bin/wazuh-execd', '38b4ca78d0dc4a97e52ec697d8830352'), ('/var/ossec/lib/libsysinfo.so', '0e3f0be4e9c336be798266803939c648'), ('/var/ossec/lib/libstdc++.so.6', '45cacd641807d3ae8b0652edaa4a3d05'), ('/var/ossec/lib/libwazuhshared.so', 'a04f564d52af96ee22de2126982ce2bd'), ('/var/ossec/lib/libfimdb.so', 'bfedab21253c88257020d4fa45de3ba5'), ('/var/ossec/lib/libsyscollector.so', 'ac7bec3a13951d9a02516d95304b1347'), ('/var/ossec/lib/librsync.so', '9b5aedc37feef205f42587d6d1ae6ce6'), ('/var/ossec/lib/libwazuhext.so', 'b1af037c67307d72caa959346e0c4bce'), ('/var/ossec/lib/libgcc_s.so.1', '2dc0d65eb50278e2eae1519d17a7b764'), ('/var/ossec/lib/libdbsync.so', '7dc8363c9f41e566f5509ffc4d1c5ca9'), ('/var/ossec/etc/client.keys', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/etc/localtime', '38bb24ba4d742dd6f50c1cba29cd966a'), ('/var/ossec/etc/wpk_root.pem', '62a376c2059a97b26415040cf51ffed9'), ('/var/ossec/etc/local_internal_options.conf', '02d970a0df2e22fd0c6cca597d3eff97'), ('/var/ossec/etc/internal_options.conf', '0e4bc89fe0dc133908ada6f3e4078fed'), ('/var/ossec/etc/ossec.conf', 'e8eb1ae42aa07fcbecb77cffa7583eb3'), ('/var/ossec/etc/shared/rootkit_trojans.txt', '0f4ccc3a78b7989644d0d85b2a888a6b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', '39fec042d6f9f68ae6ed6837dd9d36ce'), ('/var/ossec/etc/shared/win_audit_rcl.txt', '7081a34961d9d0244a0238d4000b9821'), ('/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', '287276a269d9d412229e06e6aae19aa3'), ('/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', '23f48bac6361e28e3cfe9dae65d9cdb7'), ('/var/ossec/etc/shared/win_malware_rcl.txt', 'dce0fd97a51f6a03ee2529c9a7c78fc0'), ('/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', 'b774694648d06196c62f18b65c6ae362'), ('/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', '5cc644ed02a62341960fd46d50e30399'), ('/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', '732e1cc44433ecd8c13be1b6967eaabc'), ('/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', '80c48eb8d9fc25a2bf19f1538d4dc11a'), ('/var/ossec/etc/shared/system_audit_ssh.txt', 'd6384ddcd72864a14bc73e433e3aaf17'), ('/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', 'fdc029f8b838b55395ca317cc4e2bb16'), ('/var/ossec/etc/shared/cis_apache2224_rcl.txt', '8b74055e0b72ad5e06dc0468f4e992ef'), ('/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', '7331ea6f235ad8cee69441df3a0a94d1'), ('/var/ossec/etc/shared/win_applications_rcl.txt', 'ea5686ce6eafe5268bdba42ea367ec17'), ('/var/ossec/etc/shared/system_audit_rcl.txt', 'cf63d35a9e7ffdf943c41894f0598f0f'), ('/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', '7621888a614065f8a80d3e243f6dd0b2'), ('/var/ossec/etc/shared/cis_debian_linux_rcl.txt', '52bca6f514fede26c4edaf3112614447'), ('/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', 'e823532eaa108671cbcb0bf4c687dd8b'), ('/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', '21580a5bd6fa4362deba1070613032d1'), ('/var/ossec/etc/shared/rootkit_files.txt', '6943964a87d768d8434fffbaceda89f2'), ('/var/ossec/active-response/bin/firewall-drop', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/kaspersky.py', '0c32c5d717983a7f03b32b0d4c6d6e43'), ('/var/ossec/active-response/bin/route-null', 'a89fd52f702955e40babb75ff3ef35b8'), ('/var/ossec/active-response/bin/restart-wazuh', 'abbc5ba7dc7c562bcebd7472f5962404'), ('/var/ossec/active-response/bin/ip-customblock', '920d56367df65c4f1aeede8519a8d070'), ('/var/ossec/active-response/bin/firewalld-drop', '2bfc1e923124f06478a3e4ddd39587fb'), ('/var/ossec/active-response/bin/default-firewall-drop', '7c0416b8851db343e6238055b49f49d7'), ('/var/ossec/active-response/bin/pf', '416b5f7e00a4da47e9253aa7d8b768d9'), ('/var/ossec/active-response/bin/restart.sh', '238d4466f70e8140d7dfdf741a84e5ac'), ('/var/ossec/active-response/bin/host-deny', '2662a6a926679aba40aa544da1d39cad'), ('/var/ossec/active-response/bin/ipfw', 'b668b777a52e33485811faae0f02a394'), ('/var/ossec/active-response/bin/disable-account', 'b6e09410d2fbc3f2e1c16d0c0ce973e4'), ('/var/ossec/active-response/bin/wazuh-slack', 'ce42ff5cd35b731db96a3a3f286e52eb'), ('/var/ossec/active-response/bin/npf', '49435a5d10fa00de55d3e7540a48bf1e'), ('/var/ossec/active-response/bin/kaspersky', 'f613e4a90a6230cb6f8916d518fad2f0'), ('/var/ossec/logs/active-responses.log', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/logs/ossec.log', '311a955b3202512fc5160c454fee1082'), ('/var/ossec/queue/syscollector/norm_config.json', 'd619e8d5dfab6cbec9c7751bf59254a3'), ('/var/ossec/queue/syscollector/db/local.db-journal', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/syscollector/db/local.db', '8af8b9368ba8b6b79604673168066193'), ('/var/ossec/queue/fim/db/fim.db', '6fe93763addfdfe6e5c22c3efe60b66f'), ('/var/ossec/queue/fim/db/fim.db-journal', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/wmodules', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/control', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/com', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/.wait', '2db95e8e1a9267b7a1188556b2013b33'), ('/var/ossec/queue/sockets/upgrade', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/queue', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/logcollector', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/sockets/syscheck', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/cfgaq', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/alerts/execq', 'd41d8cd98f00b204e9800998ecf8427e'), ('/var/ossec/queue/logcollector/file_status.json', 'a72ac32d686252b63c01aa98f8fd2321')]Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages will be REMOVED:
      wazuh-agent
    0 upgraded, 0 newly installed, 1 to remove and 80 not upgraded.
    After this operation, 31.5 MB disk space will be freed.
    (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 83377 files and directories currently installed.)
    Removing wazuh-agent (4.7.2-1) ...
    Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages will be REMOVED:
      wazuh-agent*
    0 upgraded, 0 newly installed, 1 to remove and 80 not upgraded.
    After this operation, 0 B of additional disk space will be used.
    (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 83013 files and directories currently installed.)
    Purging configuration files for wazuh-agent (4.7.2-1) ...
    dpkg: warning: while removing wazuh-agent, directory '/usr/lib/systemd/system' not empty so not removed
  
    sudo apt-get remove -y wazuh-agent
    sudo apt-get remove -y --purge wazuh-agent
  
    Post scan:
    []
  
    Detected changes:
    [('/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', 'Deleted', None), ('/var/ossec/wodles/utils.py', 'Deleted', None), ('/var/ossec/wodles/__init__.py', 'Deleted', None), ('/var/ossec/wodles/aws/aws-s3', 'Deleted', None), ('/var/ossec/wodles/azure/orm.py', 'Deleted', None), ('/var/ossec/wodles/azure/azure-logs', 'Deleted', None), ('/var/ossec/wodles/docker/DockerListener', 'Deleted', None), ('/var/ossec/wodles/gcloud/exceptions.py', 'Deleted', None), ('/var/ossec/wodles/gcloud/integration.py', 'Deleted', None), ('/var/ossec/wodles/gcloud/tools.py', 'Deleted', None), ('/var/ossec/wodles/gcloud/gcloud', 'Deleted', None), ('/var/ossec/wodles/gcloud/pubsub/subscriber.py', 'Deleted', None), ('/var/ossec/wodles/gcloud/buckets/bucket.py', 'Deleted', None), ('/var/ossec/wodles/gcloud/buckets/access_logs.py', 'Deleted', None), ('/var/ossec/var/run/wazuh-agentd.state', 'Deleted', None), ('/var/ossec/var/run/wazuh-agentd-96953.pid', 'Deleted', None), ('/var/ossec/var/run/wazuh-execd-96942.pid', 'Deleted', None), ('/var/ossec/var/run/wazuh-modulesd-96996.pid', 'Deleted', None), ('/var/ossec/var/run/wazuh-syscheckd-96966.pid', 'Deleted', None), ('/var/ossec/var/run/wazuh-logcollector-96979.pid', 'Deleted', None), ('/var/ossec/var/run/wazuh-logcollector.state', 'Deleted', None), ('/var/ossec/var/selinux/wazuh.pp', 'Deleted', None), ('/var/ossec/agentless/register_host.sh', 'Deleted', None), ('/var/ossec/agentless/ssh_integrity_check_linux', 'Deleted', None), ('/var/ossec/agentless/ssh_asa-fwsmconfig_diff', 'Deleted', None), ('/var/ossec/agentless/sshlogin.exp', 'Deleted', None), ('/var/ossec/agentless/ssh_foundry_diff', 'Deleted', None), ('/var/ossec/agentless/ssh_generic_diff', 'Deleted', None), ('/var/ossec/agentless/main.exp', 'Deleted', None), ('/var/ossec/agentless/su.exp', 'Deleted', None), ('/var/ossec/agentless/ssh.exp', 'Deleted', None), ('/var/ossec/agentless/ssh_pixconfig_diff', 'Deleted', None), ('/var/ossec/agentless/ssh_nopass.exp', 'Deleted', None), ('/var/ossec/agentless/ssh_integrity_check_bsd', 'Deleted', None), ('/var/ossec/bin/wazuh-control', 'Deleted', None), ('/var/ossec/bin/agent-auth', 'Deleted', None), ('/var/ossec/bin/wazuh-agentd', 'Deleted', None), ('/var/ossec/bin/wazuh-logcollector', 'Deleted', None), ('/var/ossec/bin/wazuh-modulesd', 'Deleted', None), ('/var/ossec/bin/manage_agents', 'Deleted', None), ('/var/ossec/bin/wazuh-syscheckd', 'Deleted', None), ('/var/ossec/bin/wazuh-execd', 'Deleted', None), ('/var/ossec/lib/libsysinfo.so', 'Deleted', None), ('/var/ossec/lib/libstdc++.so.6', 'Deleted', None), ('/var/ossec/lib/libwazuhshared.so', 'Deleted', None), ('/var/ossec/lib/libfimdb.so', 'Deleted', None), ('/var/ossec/lib/libsyscollector.so', 'Deleted', None), ('/var/ossec/lib/librsync.so', 'Deleted', None), ('/var/ossec/lib/libwazuhext.so', 'Deleted', None), ('/var/ossec/lib/libgcc_s.so.1', 'Deleted', None), ('/var/ossec/lib/libdbsync.so', 'Deleted', None), ('/var/ossec/etc/client.keys', 'Deleted', None), ('/var/ossec/etc/localtime', 'Deleted', None), ('/var/ossec/etc/wpk_root.pem', 'Deleted', None), ('/var/ossec/etc/local_internal_options.conf', 'Deleted', None), ('/var/ossec/etc/internal_options.conf', 'Deleted', None), ('/var/ossec/etc/ossec.conf', 'Deleted', None), ('/var/ossec/etc/shared/rootkit_trojans.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/win_audit_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/win_malware_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/system_audit_ssh.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_apache2224_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/win_applications_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/system_audit_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_debian_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', 'Deleted', None), ('/var/ossec/etc/shared/rootkit_files.txt', 'Deleted', None), ('/var/ossec/active-response/bin/firewall-drop', 'Deleted', None), ('/var/ossec/active-response/bin/kaspersky.py', 'Deleted', None), ('/var/ossec/active-response/bin/route-null', 'Deleted', None), ('/var/ossec/active-response/bin/restart-wazuh', 'Deleted', None), ('/var/ossec/active-response/bin/ip-customblock', 'Deleted', None), ('/var/ossec/active-response/bin/firewalld-drop', 'Deleted', None), ('/var/ossec/active-response/bin/default-firewall-drop', 'Deleted', None), ('/var/ossec/active-response/bin/pf', 'Deleted', None), ('/var/ossec/active-response/bin/restart.sh', 'Deleted', None), ('/var/ossec/active-response/bin/host-deny', 'Deleted', None), ('/var/ossec/active-response/bin/ipfw', 'Deleted', None), ('/var/ossec/active-response/bin/disable-account', 'Deleted', None), ('/var/ossec/active-response/bin/wazuh-slack', 'Deleted', None), ('/var/ossec/active-response/bin/npf', 'Deleted', None), ('/var/ossec/active-response/bin/kaspersky', 'Deleted', None), ('/var/ossec/logs/active-responses.log', 'Deleted', None), ('/var/ossec/logs/ossec.log', 'Deleted', None), ('/var/ossec/queue/syscollector/norm_config.json', 'Deleted', None), ('/var/ossec/queue/syscollector/db/local.db-journal', 'Deleted', None), ('/var/ossec/queue/syscollector/db/local.db', 'Deleted', None), ('/var/ossec/queue/fim/db/fim.db', 'Deleted', None), ('/var/ossec/queue/fim/db/fim.db-journal', 'Deleted', None), ('/var/ossec/queue/sockets/wmodules', 'Deleted', None), ('/var/ossec/queue/sockets/control', 'Deleted', None), ('/var/ossec/queue/sockets/com', 'Deleted', None), ('/var/ossec/queue/sockets/.wait', 'Deleted', None), ('/var/ossec/queue/sockets/upgrade', 'Deleted', None), ('/var/ossec/queue/sockets/queue', 'Deleted', None), ('/var/ossec/queue/sockets/logcollector', 'Deleted', None), ('/var/ossec/queue/sockets/syscheck', 'Deleted', None), ('/var/ossec/queue/alerts/cfgaq', 'Deleted', None), ('/var/ossec/queue/alerts/execq', 'Deleted', None), ('/var/ossec/queue/logcollector/file_status.json', 'Deleted', None)]

Still some issues around file reading happened, however, the method is detecting the changes in a specific directory

@pro-akim
Copy link
Member

pro-akim commented Feb 15, 2024

Update

Some changes have been done in the check-file comparison function:

Install scenario:

  1. /var snapshot_pre
  2. Wazuh Agent installation
  3. /var snapshot_post
  4. comparison between snapshot_pre and snapshot_post
postinstall =  {'changed_files': ['/var/log/dpkg.log', '/var/log/auth.log', '/var/log/syslog', '/var/log/journal/ea8d563452674de897687e4c554abfba/system.journal', '/var/lib/dpkg/status', '/var/cache/apt/pkgcache.bin'], 'added_files': ['/var/lib/dpkg/info/wazuh-agent.postinst', '/var/lib/dpkg/info/wazuh-agent.conffiles', '/var/lib/dpkg/info/wazuh-agent.preinst', '/var/lib/dpkg/info/wazuh-agent.postrm', '/var/lib/dpkg/info/wazuh-agent.templates', '/var/lib/dpkg/info/wazuh-agent.prerm', '/var/lib/dpkg/info/wazuh-agent.shlibs', '/var/lib/dpkg/info/wazuh-agent.list', '/var/lib/dpkg/info/wazuh-agent.md5sums', '/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', '/var/ossec/wodles/utils.py', '/var/ossec/wodles/__init__.py', '/var/ossec/wodles/aws/aws-s3', '/var/ossec/wodles/azure/orm.py', '/var/ossec/wodles/azure/azure-logs', '/var/ossec/wodles/docker/DockerListener', '/var/ossec/wodles/gcloud/exceptions.py', '/var/ossec/wodles/gcloud/integration.py', '/var/ossec/wodles/gcloud/tools.py', '/var/ossec/wodles/gcloud/gcloud', '/var/ossec/wodles/gcloud/pubsub/subscriber.py', '/var/ossec/wodles/gcloud/buckets/bucket.py', '/var/ossec/wodles/gcloud/buckets/access_logs.py', '/var/ossec/var/run/wazuh-syscheckd-120670.pid', '/var/ossec/var/run/wazuh-agentd.state', '/var/ossec/var/run/wazuh-agentd-120657.pid', '/var/ossec/var/run/wazuh-execd-120646.pid', '/var/ossec/var/run/wazuh-modulesd-120700.pid', '/var/ossec/var/run/wazuh-logcollector-120683.pid', '/var/ossec/var/selinux/wazuh.pp', '/var/ossec/agentless/register_host.sh', '/var/ossec/agentless/ssh_integrity_check_linux', '/var/ossec/agentless/ssh_asa-fwsmconfig_diff', '/var/ossec/agentless/sshlogin.exp', '/var/ossec/agentless/ssh_foundry_diff', '/var/ossec/agentless/ssh_generic_diff', '/var/ossec/agentless/main.exp', '/var/ossec/agentless/su.exp', '/var/ossec/agentless/ssh.exp', '/var/ossec/agentless/ssh_pixconfig_diff', '/var/ossec/agentless/ssh_nopass.exp', '/var/ossec/agentless/ssh_integrity_check_bsd', '/var/ossec/bin/wazuh-control', '/var/ossec/bin/agent-auth', '/var/ossec/bin/wazuh-agentd', '/var/ossec/bin/wazuh-logcollector', '/var/ossec/bin/wazuh-modulesd', '/var/ossec/bin/manage_agents', '/var/ossec/bin/wazuh-syscheckd', '/var/ossec/bin/wazuh-execd', '/var/ossec/lib/libsysinfo.so', '/var/ossec/lib/libstdc++.so.6', '/var/ossec/lib/libwazuhshared.so', '/var/ossec/lib/libfimdb.so', '/var/ossec/lib/libsyscollector.so', '/var/ossec/lib/librsync.so', '/var/ossec/lib/libwazuhext.so', '/var/ossec/lib/libgcc_s.so.1', '/var/ossec/lib/libdbsync.so', '/var/ossec/etc/client.keys', '/var/ossec/etc/localtime', '/var/ossec/etc/wpk_root.pem', '/var/ossec/etc/local_internal_options.conf', '/var/ossec/etc/internal_options.conf', '/var/ossec/etc/ossec.conf', '/var/ossec/etc/shared/rootkit_trojans.txt', '/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', '/var/ossec/etc/shared/win_audit_rcl.txt', '/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', '/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', '/var/ossec/etc/shared/win_malware_rcl.txt', '/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', '/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', '/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', '/var/ossec/etc/shared/system_audit_ssh.txt', '/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', '/var/ossec/etc/shared/cis_apache2224_rcl.txt', '/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', '/var/ossec/etc/shared/win_applications_rcl.txt', '/var/ossec/etc/shared/system_audit_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', '/var/ossec/etc/shared/cis_debian_linux_rcl.txt', '/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', '/var/ossec/etc/shared/rootkit_files.txt', '/var/ossec/active-response/bin/firewall-drop', '/var/ossec/active-response/bin/kaspersky.py', '/var/ossec/active-response/bin/route-null', '/var/ossec/active-response/bin/restart-wazuh', '/var/ossec/active-response/bin/ip-customblock', '/var/ossec/active-response/bin/firewalld-drop', '/var/ossec/active-response/bin/default-firewall-drop', '/var/ossec/active-response/bin/pf', '/var/ossec/active-response/bin/restart.sh', '/var/ossec/active-response/bin/host-deny', '/var/ossec/active-response/bin/ipfw', '/var/ossec/active-response/bin/disable-account', '/var/ossec/active-response/bin/wazuh-slack', '/var/ossec/active-response/bin/npf', '/var/ossec/active-response/bin/kaspersky', '/var/ossec/logs/active-responses.log', '/var/ossec/logs/ossec.log', '/var/ossec/queue/syscollector/norm_config.json', '/var/ossec/queue/syscollector/db/local.db-journal', '/var/ossec/queue/syscollector/db/local.db', '/var/ossec/queue/fim/db/fim.db', '/var/ossec/queue/fim/db/fim.db-journal', '/var/ossec/queue/sockets/wmodules', '/var/ossec/queue/sockets/control', '/var/ossec/queue/sockets/com', '/var/ossec/queue/sockets/.wait', '/var/ossec/queue/sockets/upgrade', '/var/ossec/queue/sockets/queue', '/var/ossec/queue/sockets/logcollector', '/var/ossec/queue/sockets/syscheck', '/var/ossec/queue/alerts/cfgaq', '/var/ossec/queue/alerts/execq', '/var/ossec/queue/logcollector/file_status.json'], 'deleted_files': []}

Number of files added:

print(len(postinstall['added_files']))

Print results

119

Uninstall scenario:

  1. /var snapshot_pre
  2. Wazuh Agent uninstall
  3. /var snapshot_post
  4. comparison between snapshot_pre and snapshot_post
postdelete =  {'changed_files': ['/var/log/dpkg.log', '/var/log/auth.log', '/var/log/syslog', '/var/log/apt/history.log', '/var/log/apt/term.log', '/var/log/journal/ea8d563452674de897687e4c554abfba/system.journal', '/var/lib/dpkg/status', '/var/cache/apt/pkgcache.bin'], 'added_files': [], 'deleted_files': ['/var/lib/dpkg/info/wazuh-agent.postinst', '/var/lib/dpkg/info/wazuh-agent.conffiles', '/var/lib/dpkg/info/wazuh-agent.preinst', '/var/lib/dpkg/info/wazuh-agent.postrm', '/var/lib/dpkg/info/wazuh-agent.templates', '/var/lib/dpkg/info/wazuh-agent.prerm', '/var/lib/dpkg/info/wazuh-agent.shlibs', '/var/lib/dpkg/info/wazuh-agent.list', '/var/lib/dpkg/info/wazuh-agent.md5sums', '/var/ossec/ruleset/sca/cis_ubuntu22-04.yml', '/var/ossec/wodles/utils.py', '/var/ossec/wodles/__init__.py', '/var/ossec/wodles/aws/aws-s3', '/var/ossec/wodles/azure/orm.py', '/var/ossec/wodles/azure/azure-logs', '/var/ossec/wodles/docker/DockerListener', '/var/ossec/wodles/gcloud/exceptions.py', '/var/ossec/wodles/gcloud/integration.py', '/var/ossec/wodles/gcloud/tools.py', '/var/ossec/wodles/gcloud/gcloud', '/var/ossec/wodles/gcloud/pubsub/subscriber.py', '/var/ossec/wodles/gcloud/buckets/bucket.py', '/var/ossec/wodles/gcloud/buckets/access_logs.py', '/var/ossec/var/run/wazuh-syscheckd-120670.pid', '/var/ossec/var/run/wazuh-agentd.state', '/var/ossec/var/run/wazuh-agentd-120657.pid', '/var/ossec/var/run/wazuh-execd-120646.pid', '/var/ossec/var/run/wazuh-modulesd-120700.pid', '/var/ossec/var/run/wazuh-logcollector-120683.pid', '/var/ossec/var/run/wazuh-logcollector.state', '/var/ossec/var/selinux/wazuh.pp', '/var/ossec/agentless/register_host.sh', '/var/ossec/agentless/ssh_integrity_check_linux', '/var/ossec/agentless/ssh_asa-fwsmconfig_diff', '/var/ossec/agentless/sshlogin.exp', '/var/ossec/agentless/ssh_foundry_diff', '/var/ossec/agentless/ssh_generic_diff', '/var/ossec/agentless/main.exp', '/var/ossec/agentless/su.exp', '/var/ossec/agentless/ssh.exp', '/var/ossec/agentless/ssh_pixconfig_diff', '/var/ossec/agentless/ssh_nopass.exp', '/var/ossec/agentless/ssh_integrity_check_bsd', '/var/ossec/bin/wazuh-control', '/var/ossec/bin/agent-auth', '/var/ossec/bin/wazuh-agentd', '/var/ossec/bin/wazuh-logcollector', '/var/ossec/bin/wazuh-modulesd', '/var/ossec/bin/manage_agents', '/var/ossec/bin/wazuh-syscheckd', '/var/ossec/bin/wazuh-execd', '/var/ossec/lib/libsysinfo.so', '/var/ossec/lib/libstdc++.so.6', '/var/ossec/lib/libwazuhshared.so', '/var/ossec/lib/libfimdb.so', '/var/ossec/lib/libsyscollector.so', '/var/ossec/lib/librsync.so', '/var/ossec/lib/libwazuhext.so', '/var/ossec/lib/libgcc_s.so.1', '/var/ossec/lib/libdbsync.so', '/var/ossec/etc/client.keys', '/var/ossec/etc/localtime', '/var/ossec/etc/wpk_root.pem', '/var/ossec/etc/local_internal_options.conf', '/var/ossec/etc/internal_options.conf', '/var/ossec/etc/ossec.conf', '/var/ossec/etc/shared/rootkit_trojans.txt', '/var/ossec/etc/shared/cis_win2012r2_memberL2_rcl.txt', '/var/ossec/etc/shared/win_audit_rcl.txt', '/var/ossec/etc/shared/cis_rhel_linux_rcl.txt', '/var/ossec/etc/shared/cis_mysql5-6_community_rcl.txt', '/var/ossec/etc/shared/win_malware_rcl.txt', '/var/ossec/etc/shared/cis_sles11_linux_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_domainL2_rcl.txt', '/var/ossec/etc/shared/cis_mysql5-6_enterprise_rcl.txt', '/var/ossec/etc/shared/cis_rhel5_linux_rcl.txt', '/var/ossec/etc/shared/system_audit_ssh.txt', '/var/ossec/etc/shared/cis_sles12_linux_rcl.txt', '/var/ossec/etc/shared/cis_apache2224_rcl.txt', '/var/ossec/etc/shared/cis_rhel7_linux_rcl.txt', '/var/ossec/etc/shared/win_applications_rcl.txt', '/var/ossec/etc/shared/system_audit_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_domainL1_rcl.txt', '/var/ossec/etc/shared/cis_debian_linux_rcl.txt', '/var/ossec/etc/shared/cis_rhel6_linux_rcl.txt', '/var/ossec/etc/shared/cis_win2012r2_memberL1_rcl.txt', '/var/ossec/etc/shared/rootkit_files.txt', '/var/ossec/active-response/bin/firewall-drop', '/var/ossec/active-response/bin/kaspersky.py', '/var/ossec/active-response/bin/route-null', '/var/ossec/active-response/bin/restart-wazuh', '/var/ossec/active-response/bin/ip-customblock', '/var/ossec/active-response/bin/firewalld-drop', '/var/ossec/active-response/bin/default-firewall-drop', '/var/ossec/active-response/bin/pf', '/var/ossec/active-response/bin/restart.sh', '/var/ossec/active-response/bin/host-deny', '/var/ossec/active-response/bin/ipfw', '/var/ossec/active-response/bin/disable-account', '/var/ossec/active-response/bin/wazuh-slack', '/var/ossec/active-response/bin/npf', '/var/ossec/active-response/bin/kaspersky', '/var/ossec/logs/active-responses.log', '/var/ossec/logs/ossec.log', '/var/ossec/queue/syscollector/norm_config.json', '/var/ossec/queue/syscollector/db/local.db-journal', '/var/ossec/queue/syscollector/db/local.db', '/var/ossec/queue/fim/db/fim.db', '/var/ossec/queue/fim/db/fim.db-journal', '/var/ossec/queue/sockets/wmodules', '/var/ossec/queue/sockets/control', '/var/ossec/queue/sockets/com', '/var/ossec/queue/sockets/.wait', '/var/ossec/queue/sockets/upgrade', '/var/ossec/queue/sockets/queue', '/var/ossec/queue/sockets/logcollector', '/var/ossec/queue/sockets/syscheck', '/var/ossec/queue/alerts/cfgaq', '/var/ossec/queue/alerts/execq', '/var/ossec/queue/logcollector/file_status.json']}

Number of files deleted:

print(len(postdelete['deleted_files'])

Print results

120

This would make us understand that using the number of files is not a good idea. The criteria to be used must be defined.

@pro-akim
Copy link
Member

Update

Moving to an issue with higher priority.

@wazuhci wazuhci moved this from In progress to On hold in Release 4.9.0 Feb 15, 2024
@wazuhci wazuhci moved this from On hold to In progress in Release 4.9.0 Feb 19, 2024
@pro-akim
Copy link
Member

pro-akim commented Feb 19, 2024

Update

Considering the highlighted point in #4843 (comment), depending on the test, the provision should receive variables from installing only the manager, only the dependencies and libraries or those tasks should be handled by the test module as well. This point should be discussed with the team.


Another problem is that the test module commands are executed in the agent.
In case I want to install the manager from the test module, I will need to refactor the structure of the module


After some discussion with the team. The manager will be installed by the provision. The agent by the Test module.
In case the test module does not include the install test, the provision module should be added in the Yaml fixture to have the agent provision.

@wazuhci wazuhci moved this from In progress to On hold in Release 4.9.0 Feb 19, 2024
@wazuhci wazuhci moved this from On hold to In progress in Release 4.9.0 Feb 20, 2024
pro-akim added a commit that referenced this issue Mar 19, 2024
@pro-akim
Copy link
Member

pro-akim commented Mar 19, 2024

Update

Testing in AWS

Some issues doing ssh to EC2 instances

image

akim@akim-PC:/tmp$ cat dtt1-poc/manager-linux-centos-7-amd64/inventory.yaml 
ansible_host: ec2-52-203-194-48.compute-1.amazonaws.com
ansible_port: 22
ansible_ssh_private_key_file: /tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782
ansible_user: ec2-user
akim@akim-PC:/tmp$ ssh -i "/tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782" [email protected]
ssh: connect to host ec2-52-203-194-48.compute-1.amazonaws.com port 22: Connection timed out

akim@akim-PC:/tmp$ cat /tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAm/JzBA7e9yYjvrXYCDLFcErlLEZShkBGdU9PSs26uQWhaX1l
9DvAeIhECUu7B4WgJlnFacC15ScaWsuhxeMTX/fs93hTCXul1Yrq1iVjHkgBN+AV
.
.
.


It seems that there are some issues with the EC2 which host is not event possible to ping.
The ssh doesn't work.

On the other side:

akim@akim-PC:/tmp$ ping ec2-52-203-194-48.compute-1.amazonaws.com
PING ec2-52-203-194-48.compute-1.amazonaws.com (52.203.194.48) 56(84) bytes of data.
^C
--- ec2-52-203-194-48.compute-1.amazonaws.com ping statistics ---
423 packets transmitted, 0 received, 100% packet loss, time 432128ms

This point will be discussed with @fcaffieri @QU3B1M and @wazuh/devel-devops team

@wazuhci wazuhci moved this from In progress to On hold in Release 4.9.0 Mar 20, 2024
@rauldpm
Copy link
Member

rauldpm commented Mar 20, 2024

Meet defined: Sync allocation module - Wednesday, March 20⋅8:00 – 8:30pm ESP
Changed status to Blocked for third-party

@wazuhci wazuhci moved this from On hold to Blocked in Release 4.9.0 Mar 20, 2024
@pro-akim
Copy link
Member

pro-akim commented Mar 21, 2024

Update

Testing in AWS

  1. Port added in the command, the AWS instance has worked in 2200 instead of 22 due to Added userData for AWS deployments #5027
  2. socket.gethostbyname() was used where IP instead of DNS is required
  3. Private IP was required to register the agent to the manager. boto3 methods was used.
Result AWS 🟢
(deplo_test) akim@akim-PC:~/Desktop/wazuh-qa/deployability$ python3  modules/testing/main.py --wazuh-revision '40714' --wazuh-version '4.7.3' --component 'agent' --tests 'install,registration,stop,restart,uninstall' --targets '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --targets '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}' --dependencies '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --live 'True'
component='agent' wazuh_version='4.7.3' wazuh_revision='40714' wazuh_branch=None working_dir='/tmp/tests' live=True tests=['install', 'registration', 'stop', 'restart', 'uninstall'] targets=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}', '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}'] dependencies=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}'] cleanup=True
[2024-03-21 12:55:30] [INFO] TESTER: Running tests for ec2-54-162-7-172.compute-1.amazonaws.com
[2024-03-21 12:55:30] [INFO] TESTER: Running tests for ec2-54-144-42-190.compute-1.amazonaws.com
[2024-03-21 12:55:30] [INFO] TESTER: Dependencies ec2-54-162-7-172.compute-1.amazonaws.com
[2024-03-21 12:55:30] [DEBUG] TESTER: Using extra vars: {'component': 'agent', 'wazuh_version': '4.7.3', 'wazuh_revision': '40714', 'wazuh_branch': None, 'working_dir': '/tmp/tests', 'live': True, 'hosts_ip': ['ec2-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.compute-1.amazonaws.com'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}', 'dependencies': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'}
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.compute-1.amazonaws.com']}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Cleaning old key ssh-keygen registries] **********************************
changed: [localhost] => (item=ec2-54-162-7-172.compute-1.amazonaws.com) => changed=true 
  ansible_loop_var: item
  cmd:
  - ssh-keygen
  - -f
  - /home/akim/.ssh/known_hosts
  - -R
  - ''
  delta: '0:00:00.009056'
  end: '2024-03-21 12:55:35.643749'
  item: ec2-54-162-7-172.compute-1.amazonaws.com
  msg: ''
  rc: 0
  start: '2024-03-21 12:55:35.634693'
  stderr: Host  not found in /home/akim/.ssh/known_hosts
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
changed: [localhost] => (item=ec2-54-144-42-190.compute-1.amazonaws.com) => changed=true 
  ansible_loop_var: item
  cmd:
  - ssh-keygen
  - -f
  - /home/akim/.ssh/known_hosts
  - -R
  - ''
  delta: '0:00:00.009188'
  end: '2024-03-21 12:55:35.807755'
  item: ec2-54-144-42-190.compute-1.amazonaws.com
  msg: ''
  rc: 0
  start: '2024-03-21 12:55:35.798567'
  stderr: Host  not found in /home/akim/.ssh/known_hosts
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.compute-1.amazonaws.com']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test install for agent] **************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_install.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:02:36.220494'
  end: '2024-03-21 12:58:15.132643'
  msg: ''
  rc: 0
  start: '2024-03-21 12:55:38.912149'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Failed to stop firewalld.service: Unit firewalld.service not loaded.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Failed to disable unit: Unit file firewalld.service does not exist.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Failed to stop firewalld.service: Unit firewalld.service not loaded.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Failed to disable unit: Unit file firewalld.service does not exist.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    --2024-03-21 11:57:45--  https://packages-dev.wazuh.com/pre-release/apt/pool/main/w/wazuh-agent/wazuh-agent_4.7.3-1_amd64.deb
    Resolving packages-dev.wazuh.com (packages-dev.wazuh.com)... 18.160.41.126, 18.160.41.28, 18.160.41.76, ...
    Connecting to packages-dev.wazuh.com (packages-dev.wazuh.com)|18.160.41.126|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 9362524 (8.9M) [binary/octet-stream]
    Saving to: 'wazuh-agent_4.7.3-1_amd64.deb'
  
         0K .......... .......... .......... .......... ..........  0%  819K 11s
        50K .......... .......... .......... .......... ..........  1%  812K 11s
       100K .......... .......... .......... .......... ..........  1%  830K 11s
       150K .......... .......... .......... .......... ..........  2%  125M 8s
       200K .......... .......... .......... .......... ..........  2%  120M 7s
       250K .......... .......... .......... .......... ..........  3%  159M 5s
       300K .......... .......... .......... .......... ..........  3%  822K 6s
       350K .......... .......... .......... .......... ..........  4% 31.5M 5s
       400K .......... .......... .......... .......... ..........  4%  271M 5s
       450K .......... .......... .......... .......... ..........  5%  202M 4s
       500K .......... .......... .......... .......... ..........  6%  226M 4s
       550K .......... .......... .......... .......... ..........  6%  235M 4s
       600K .......... .......... .......... .......... ..........  7%  863K 4s
       650K .......... .......... .......... .......... ..........  7%  111M 4s
       700K .......... .......... .......... .......... ..........  8% 90.9M 3s
       750K .......... .......... .......... .......... ..........  8%  127M 3s
       800K .......... .......... .......... .......... ..........  9%  230M 3s
       850K .......... .......... .......... .......... ..........  9%  200M 3s
       900K .......... .......... .......... .......... .......... 10%  212M 3s
       950K .......... .......... .......... .......... .......... 10%  230M 3s
      1000K .......... .......... .......... .......... .......... 11%  197M 2s
      1050K .......... .......... .......... .......... .......... 12%  178M 2s
      1100K .......... .......... .......... .......... .......... 12%  222M 2s
      1150K .......... .......... .......... .......... .......... 13%  195M 2s
      1200K .......... .......... .......... .......... .......... 13%  250M 2s
      1250K .......... .......... .......... .......... .......... 14%  232M 2s
      1300K .......... .......... .......... .......... .......... 14%  862K 2s
      1350K .......... .......... .......... .......... .......... 15%  134M 2s
      1400K .......... .......... .......... .......... .......... 15%  267M 2s
      1450K .......... .......... .......... .......... .......... 16%  238M 2s
      1500K .......... .......... .......... .......... .......... 16%  158M 2s
      1550K .......... .......... .......... .......... .......... 17%  235M 2s
      1600K .......... .......... .......... .......... .......... 18%  207M 2s
      1650K .......... .......... .......... .......... .......... 18%  219M 2s
      1700K .......... .......... .......... .......... .......... 19%  206M 2s
      1750K .......... .......... .......... .......... .......... 19%  197M 2s
      1800K .......... .......... .......... .......... .......... 20%  254M 1s
      1850K .......... .......... .......... .......... .......... 20%  234M 1s
      1900K .......... .......... .......... .......... .......... 21%  194M 1s
      1950K .......... .......... .......... .......... .......... 21%  242M 1s
      2000K .......... .......... .......... .......... .......... 22%  182M 1s
      2050K .......... .......... .......... .......... .......... 22%  240M 1s
      2100K .......... .......... .......... .......... .......... 23%  213M 1s
      2150K .......... .......... .......... .......... .......... 24%  225M 1s
      2200K .......... .......... .......... .......... .......... 24%  232M 1s
      2250K .......... .......... .......... .......... .......... 25%  193M 1s
      2300K .......... .......... .......... .......... .......... 25% 45.9M 1s
      2350K .......... .......... .......... .......... .......... 26% 40.4M 1s
      2400K .......... .......... .......... .......... .......... 26%  192M 1s
      2450K .......... .......... .......... .......... .......... 27%  230M 1s
      2500K .......... .......... .......... .......... .......... 27%  236M 1s
      2550K .......... .......... .......... .......... .......... 28%  236M 1s
      2600K .......... .......... .......... .......... .......... 28%  244M 1s
      2650K .......... .......... .......... .......... .......... 29%  946K 1s
      2700K .......... .......... .......... .......... .......... 30%  241M 1s
      2750K .......... .......... .......... .......... .......... 30%  180M 1s
      2800K .......... .......... .......... .......... .......... 31%  172M 1s
      2850K .......... .......... .......... .......... .......... 31%  231M 1s
      2900K .......... .......... .......... .......... .......... 32%  173M 1s
      2950K .......... .......... .......... .......... .......... 32%  202M 1s
      3000K .......... .......... .......... .......... .......... 33%  211M 1s
      3050K .......... .......... .......... .......... .......... 33%  237M 1s
      3100K .......... .......... .......... .......... .......... 34% 88.3M 1s
      3150K .......... .......... .......... .......... .......... 34%  237M 1s
      3200K .......... .......... .......... .......... .......... 35%  229M 1s
      3250K .......... .......... .......... .......... .......... 36%  224M 1s
      3300K .......... .......... .......... .......... .......... 36%  206M 1s
      3350K .......... .......... .......... .......... .......... 37%  242M 1s
      3400K .......... .......... .......... .......... .......... 37%  235M 1s
      3450K .......... .......... .......... .......... .......... 38%  207M 1s
      3500K .......... .......... .......... .......... .......... 38%  214M 1s
      3550K .......... .......... .......... .......... .......... 39%  231M 1s
      3600K .......... .......... .......... .......... .......... 39%  232M 1s
      3650K .......... .......... .......... .......... .......... 40%  215M 1s
      3700K .......... .......... .......... .......... .......... 41%  240M 1s
      3750K .......... .......... .......... .......... .......... 41%  208M 1s
      3800K .......... .......... .......... .......... .......... 42%  208M 1s
      3850K .......... .......... .......... .......... .......... 42%  237M 1s
      3900K .......... .......... .......... .......... .......... 43%  209M 1s
      3950K .......... .......... .......... .......... .......... 43%  227M 1s
      4000K .......... .......... .......... .......... .......... 44%  222M 1s
      4050K .......... .......... .......... .......... .......... 44%  208M 1s
      4100K .......... .......... .......... .......... .......... 45%  199M 1s
      4150K .......... .......... .......... .......... .......... 45%  211M 1s
      4200K .......... .......... .......... .......... .......... 46%  216M 1s
      4250K .......... .......... .......... .......... .......... 47%  229M 0s
      4300K .......... .......... .......... .......... .......... 47%  235M 0s
      4350K .......... .......... .......... .......... .......... 48%  231M 0s
      4400K .......... .......... .......... .......... .......... 48%  272M 0s
      4450K .......... .......... .......... .......... .......... 49%  217M 0s
      4500K .......... .......... .......... .......... .......... 49%  191M 0s
      4550K .......... .......... .......... .......... .......... 50%  259M 0s
      4600K .......... .......... .......... .......... .......... 50%  218M 0s
      4650K .......... .......... .......... .......... .......... 51%  207M 0s
      4700K .......... .......... .......... .......... .......... 51%  217M 0s
      4750K .......... .......... .......... .......... .......... 52%  206M 0s
      4800K .......... .......... .......... .......... .......... 53%  268M 0s
      4850K .......... .......... .......... .......... .......... 53%  203M 0s
      4900K .......... .......... .......... .......... .......... 54%  209M 0s
      4950K .......... .......... .......... .......... .......... 54%  238M 0s
      5000K .......... .......... .......... .......... .......... 55%  201M 0s
      5050K .......... .......... .......... .......... .......... 55%  213M 0s
      5100K .......... .......... .......... .......... .......... 56%  211M 0s
      5150K .......... .......... .......... .......... .......... 56%  231M 0s
      5200K .......... .......... .......... .......... .......... 57%  239M 0s
      5250K .......... .......... .......... .......... .......... 57%  234M 0s
      5300K .......... .......... .......... .......... .......... 58% 1014K 0s
      5350K .......... .......... .......... .......... .......... 59%  218M 0s
      5400K .......... .......... .......... .......... .......... 59% 57.9M 0s
      5450K .......... .......... .......... .......... .......... 60%  234M 0s
      5500K .......... .......... .......... .......... .......... 60%  231M 0s
      5550K .......... .......... .......... .......... .......... 61%  216M 0s
      5600K .......... .......... .......... .......... .......... 61%  246M 0s
      5650K .......... .......... .......... .......... .......... 62%  190M 0s
      5700K .......... .......... .......... .......... .......... 62%  205M 0s
      5750K .......... .......... .......... .......... .......... 63%  231M 0s
      5800K .......... .......... .......... .......... .......... 63%  256M 0s
      5850K .......... .......... .......... .......... .......... 64%  198M 0s
      5900K .......... .......... .......... .......... .......... 65%  209M 0s
      5950K .......... .......... .......... .......... .......... 65%  237M 0s
      6000K .......... .......... .......... .......... .......... 66%  223M 0s
      6050K .......... .......... .......... .......... .......... 66%  201M 0s
      6100K .......... .......... .......... .......... .......... 67%  198M 0s
      6150K .......... .......... .......... .......... .......... 67%  190M 0s
      6200K .......... .......... .......... .......... .......... 68%  249M 0s
      6250K .......... .......... .......... .......... .......... 68%  204M 0s
      6300K .......... .......... .......... .......... .......... 69%  212M 0s
      6350K .......... .......... .......... .......... .......... 69%  230M 0s
      6400K .......... .......... .......... .......... .......... 70%  195M 0s
      6450K .......... .......... .......... .......... .......... 71%  213M 0s
      6500K .......... .......... .......... .......... .......... 71%  210M 0s
      6550K .......... .......... .......... .......... .......... 72%  238M 0s
      6600K .......... .......... .......... .......... .......... 72%  233M 0s
      6650K .......... .......... .......... .......... .......... 73%  194M 0s
      6700K .......... .......... .......... .......... .......... 73%  198M 0s
      6750K .......... .......... .......... .......... .......... 74%  183M 0s
      6800K .......... .......... .......... .......... .......... 74%  228M 0s
      6850K .......... .......... .......... .......... .......... 75%  224M 0s
      6900K .......... .......... .......... .......... .......... 76%  247M 0s
      6950K .......... .......... .......... .......... .......... 76%  220M 0s
      7000K .......... .......... .......... .......... .......... 77%  219M 0s
      7050K .......... .......... .......... .......... .......... 77%  234M 0s
      7100K .......... .......... .......... .......... .......... 78%  206M 0s
      7150K .......... .......... .......... .......... .......... 78%  212M 0s
      7200K .......... .......... .......... .......... .......... 79%  245M 0s
      7250K .......... .......... .......... .......... .......... 79%  208M 0s
      7300K .......... .......... .......... .......... .......... 80%  207M 0s
      7350K .......... .......... .......... .......... .......... 80%  208M 0s
      7400K .......... .......... .......... .......... .......... 81%  233M 0s
      7450K .......... .......... .......... .......... .......... 82%  226M 0s
      7500K .......... .......... .......... .......... .......... 82%  224M 0s
      7550K .......... .......... .......... .......... .......... 83%  193M 0s
      7600K .......... .......... .......... .......... .......... 83%  204M 0s
      7650K .......... .......... .......... .......... .......... 84%  211M 0s
      7700K .......... .......... .......... .......... .......... 84%  199M 0s
      7750K .......... .......... .......... .......... .......... 85%  232M 0s
      7800K .......... .......... .......... .......... .......... 85%  221M 0s
      7850K .......... .......... .......... .......... .......... 86%  211M 0s
      7900K .......... .......... .......... .......... .......... 86%  212M 0s
      7950K .......... .......... .......... .......... .......... 87%  212M 0s
      8000K .......... .......... .......... .......... .......... 88%  223M 0s
      8050K .......... .......... .......... .......... .......... 88%  222M 0s
      8100K .......... .......... .......... .......... .......... 89%  193M 0s
      8150K .......... .......... .......... .......... .......... 89%  202M 0s
      8200K .......... .......... .......... .......... .......... 90%  231M 0s
      8250K .......... .......... .......... .......... .......... 90%  211M 0s
      8300K .......... .......... .......... .......... .......... 91%  218M 0s
      8350K .......... .......... .......... .......... .......... 91%  237M 0s
      8400K .......... .......... .......... .......... .......... 92%  233M 0s
      8450K .......... .......... .......... .......... .......... 92%  217M 0s
      8500K .......... .......... .......... .......... .......... 93%  195M 0s
      8550K .......... .......... .......... .......... .......... 94%  238M 0s
      8600K .......... .......... .......... .......... .......... 94%  243M 0s
      8650K .......... .......... .......... .......... .......... 95%  213M 0s
      8700K .......... .......... .......... .......... .......... 95%  236M 0s
      8750K .......... .......... .......... .......... .......... 96%  212M 0s
      8800K .......... .......... .......... .......... .......... 96%  250M 0s
      8850K .......... .......... .......... .......... .......... 97%  234M 0s
      8900K .......... .......... .......... .......... .......... 97%  177M 0s
      8950K .......... .......... .......... .......... .......... 98%  247M 0s
      9000K .......... .......... .......... .......... .......... 98%  263M 0s
      9050K .......... .......... .......... .......... .......... 99%  210M 0s
      9100K .......... .......... .......... .......... ...       100%  241M=0.5s
  
    2024-03-21 11:57:46 (17.6 MB/s) - 'wazuh-agent_4.7.3-1_amd64.deb' saved [9362524/9362524]
  
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Created symlink /etc/systemd/system/multi-user.target.wants/wazuh-agent.service → /lib/systemd/system/wazuh-agent.service.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Job for wazuh-agent.service failed because the control process exited with error code.
    See "systemctl status wazuh-agent.service" and "journalctl -xe" for details.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 4 items
  
    modules/testing/tests/test_agent/test_install.py::test_installation PASSED
    modules/testing/tests/test_agent/test_install.py::test_status PASSED
    modules/testing/tests/test_agent/test_install.py::test_version PASSED
    modules/testing/tests/test_agent/test_install.py::test_revision PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    modules/testing/tests/helpers/agent.py:57
      /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:57: DeprecationWarning: invalid escape sequence '\w'
        "-OutFile ${env.tmp}\wazuh-agent;"
  
    modules/testing/tests/helpers/agent.py:58
      /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:58: DeprecationWarning: invalid escape sequence '\w'
        "msiexec.exe /i ${env.tmp}\wazuh-agent /q"
  
    modules/testing/tests/helpers/agent.py:99
    modules/testing/tests/helpers/agent.py:99
      /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:99: DeprecationWarning: invalid escape sequence '\/'
        f"sed -i 's/<address>MANAGER_IP<\/address>/<address>{internal_ip}<\/address>/g' {WAZUH_CONF}",
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ================== 4 passed, 6 warnings in 155.64s (0:02:35) ===================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test registration for agent] *********************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_registration.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:39.202172'
  end: '2024-03-21 12:59:00.255563'
  msg: ''
  rc: 0
  start: '2024-03-21 12:58:21.053391'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 5 items
  
    modules/testing/tests/test_agent/test_registration.py::test_registration PASSED
    modules/testing/tests/test_agent/test_registration.py::test_status PASSED
    modules/testing/tests/test_agent/test_registration.py::test_connection PASSED
    modules/testing/tests/test_agent/test_registration.py::test_isActive PASSED
    modules/testing/tests/test_agent/test_registration.py::test_clientKeys PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 5 passed, 2 warnings in 38.55s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test stop for agent] *****************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_stop.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:25.825662'
  end: '2024-03-21 12:59:31.850510'
  msg: ''
  rc: 0
  start: '2024-03-21 12:59:06.024848'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 1 item
  
    modules/testing/tests/test_agent/test_stop.py::test_stop PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 1 passed, 2 warnings in 25.26s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test restart for agent] **************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_restart.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:19.139802'
  end: '2024-03-21 12:59:56.825163'
  msg: ''
  rc: 0
  start: '2024-03-21 12:59:37.685361'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 5 items
  
    modules/testing/tests/test_agent/test_restart.py::test_restart PASSED
    modules/testing/tests/test_agent/test_restart.py::test_status PASSED
    modules/testing/tests/test_agent/test_restart.py::test_connection PASSED
    modules/testing/tests/test_agent/test_restart.py::test_isActive PASSED
    modules/testing/tests/test_agent/test_restart.py::test_clientKeys PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 5 passed, 2 warnings in 18.56s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test uninstall for agent] ************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_uninstall.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:53.683342'
  end: '2024-03-21 13:00:56.404533'
  msg: ''
  rc: 0
  start: '2024-03-21 13:00:02.721191'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = (unset),
            LC_ALL = (unset),
            LC_TIME = "es_ES.UTF-8",
            LC_MONETARY = "es_ES.UTF-8",
            LC_ADDRESS = "es_ES.UTF-8",
            LC_TELEPHONE = "es_ES.UTF-8",
            LC_NAME = "es_ES.UTF-8",
            LC_MEASUREMENT = "es_ES.UTF-8",
            LC_IDENTIFICATION = "es_ES.UTF-8",
            LC_NUMERIC = "es_ES.UTF-8",
            LC_PAPER = "es_ES.UTF-8",
            LANG = "C.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("C.UTF-8").
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Removed /etc/systemd/system/multi-user.target.wants/wazuh-agent.service.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
    Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 3 items
  
    modules/testing/tests/test_agent/test_uninstall.py::test_uninstall PASSED
    modules/testing/tests/test_agent/test_uninstall.py::test_agent_uninstalled_directory PASSED
    modules/testing/tests/test_agent/test_uninstall.py::test_isActive PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 3 passed, 2 warnings in 53.11s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:00:56] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:00:56] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 13:00:56] [DEBUG] ANSIBLE: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml
No config file found; using defaults

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com]

TASK [Clean test directory] ****************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com] => changed=false 
  path: /tmp/tests
  state: absent

PLAY RECAP *********************************************************************
ec2-54-162-7-172.compute-1.amazonaws.com : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-54-162-7-172.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-54-162-7-172.compute-1.amazonaws.com': 1}, 'changed': {}}
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml
No config file found; using defaults

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com]

TASK [Clean test directory] ****************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com] => changed=false 
  path: /tmp/tests
  state: absent

PLAY RECAP *********************************************************************
ec2-54-162-7-172.compute-1.amazonaws.com : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:01:19] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-54-162-7-172.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-54-162-7-172.compute-1.amazonaws.com': 1}, 'changed': {}}
 
Result Vagrant post changes 🟢
(deplo_test) akim@akim-PC:~/Desktop/wazuh-qa/deployability$ python3  modules/testing/main.py --wazuh-revision '40714' --wazuh-version '4.7.3' --component 'agent' --tests 'install,registration,stop,restart,uninstall' --targets '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --targets '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}' --dependencies '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --live 'True'
component='agent' wazuh_version='4.7.3' wazuh_revision='40714' wazuh_branch=None working_dir='/tmp/tests' live=True tests=['install', 'registration', 'stop', 'restart', 'uninstall'] targets=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}', '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}'] dependencies=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}'] cleanup=True
[2024-03-21 13:05:45] [INFO] TESTER: Running tests for 192.168.57.4
[2024-03-21 13:05:45] [INFO] TESTER: Running tests for 192.168.57.3
[2024-03-21 13:05:45] [INFO] TESTER: Dependencies 192.168.57.4
[2024-03-21 13:05:45] [DEBUG] TESTER: Using extra vars: {'component': 'agent', 'wazuh_version': '4.7.3', 'wazuh_revision': '40714', 'wazuh_branch': None, 'working_dir': '/tmp/tests', 'live': True, 'hosts_ip': ['192.168.57.4', '192.168.57.3'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}', 'dependencies': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'}
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['192.168.57.4', '192.168.57.3']}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Cleaning old key ssh-keygen registries] **********************************
changed: [localhost] => (item=192.168.57.4) => changed=true 
  ansible_loop_var: item
  cmd:
  - ssh-keygen
  - -f
  - /home/akim/.ssh/known_hosts
  - -R
  - ''
  delta: '0:00:00.009034'
  end: '2024-03-21 13:05:51.484108'
  item: 192.168.57.4
  msg: ''
  rc: 0
  start: '2024-03-21 13:05:51.475074'
  stderr: Host  not found in /home/akim/.ssh/known_hosts
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
changed: [localhost] => (item=192.168.57.3) => changed=true 
  ansible_loop_var: item
  cmd:
  - ssh-keygen
  - -f
  - /home/akim/.ssh/known_hosts
  - -R
  - ''
  delta: '0:00:00.009338'
  end: '2024-03-21 13:05:51.651691'
  item: 192.168.57.3
  msg: ''
  rc: 0
  start: '2024-03-21 13:05:51.642353'
  stderr: Host  not found in /home/akim/.ssh/known_hosts
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['192.168.57.4', '192.168.57.3']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test install for agent] **************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_install.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:03:28.983975'
  end: '2024-03-21 13:09:23.685112'
  msg: ''
  rc: 0
  start: '2024-03-21 13:05:54.701137'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Failed to stop firewalld.service: Unit firewalld.service not loaded.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Failed to disable unit: Unit file firewalld.service does not exist.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Failed to stop firewalld.service: Unit firewalld.service not loaded.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Failed to disable unit: Unit file firewalld.service does not exist.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    --2024-03-21 12:09:07--  https://packages-dev.wazuh.com/pre-release/apt/pool/main/w/wazuh-agent/wazuh-agent_4.7.3-1_amd64.deb
    Resolving packages-dev.wazuh.com (packages-dev.wazuh.com)... 52.84.66.65, 52.84.66.16, 52.84.66.126, ...
    Connecting to packages-dev.wazuh.com (packages-dev.wazuh.com)|52.84.66.65|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 9362524 (8.9M) [binary/octet-stream]
    Saving to: 'wazuh-agent_4.7.3-1_amd64.deb'
  
         0K .......... .......... .......... .......... ..........  0%  293K 31s
        50K .......... .......... .......... .......... ..........  1%  127K 51s
       100K .......... .......... .......... .......... ..........  1% 36.9M 34s
       150K .......... .......... .......... .......... ..........  2% 1.87M 27s
       200K .......... .......... .......... .......... ..........  2% 3.00M 22s
       250K .......... .......... .......... .......... ..........  3% 4.81M 18s
       300K .......... .......... .......... .......... ..........  3% 2.47M 16s
       350K .......... .......... .......... .......... ..........  4% 3.75M 14s
       400K .......... .......... .......... .......... ..........  4% 1.42M 13s
       450K .......... .......... .......... .......... ..........  5% 3.29M 12s
       500K .......... .......... .......... .......... ..........  6% 22.0M 11s
       550K .......... .......... .......... .......... ..........  6% 2.85M 10s
       600K .......... .......... .......... .......... ..........  7% 1.04M 10s
       650K .......... .......... .......... .......... ..........  7% 1.14M 10s
       700K .......... .......... .......... .......... ..........  8% 4.43M 9s
       750K .......... .......... .......... .......... ..........  8% 17.0M 9s
       800K .......... .......... .......... .......... ..........  9% 1.61M 8s
       850K .......... .......... .......... .......... ..........  9% 3.41M 8s
       900K .......... .......... .......... .......... .......... 10% 60.0M 8s
       950K .......... .......... .......... .......... .......... 10% 2.20M 7s
      1000K .......... .......... .......... .......... .......... 11% 2.23M 7s
      1050K .......... .......... .......... .......... .......... 12% 6.33M 7s
      1100K .......... .......... .......... .......... .......... 12% 4.07M 6s
      1150K .......... .......... .......... .......... .......... 13% 3.19M 6s
      1200K .......... .......... .......... .......... .......... 13% 4.19M 6s
      1250K .......... .......... .......... .......... .......... 14% 5.61M 6s
      1300K .......... .......... .......... .......... .......... 14% 2.76M 6s
      1350K .......... .......... .......... .......... .......... 15% 3.12M 6s
      1400K .......... .......... .......... .......... .......... 15% 6.89M 5s
      1450K .......... .......... .......... .......... .......... 16% 3.89M 5s
      1500K .......... .......... .......... .......... .......... 16% 3.12M 5s
      1550K .......... .......... .......... .......... .......... 17% 4.37M 5s
      1600K .......... .......... .......... .......... .......... 18% 2.78M 5s
      1650K .......... .......... .......... .......... .......... 18% 8.66M 5s
      1700K .......... .......... .......... .......... .......... 19% 2.46M 5s
      1750K .......... .......... .......... .......... .......... 19%  113M 4s
      1800K .......... .......... .......... .......... .......... 20% 2.39M 4s
      1850K .......... .......... .......... .......... .......... 20% 17.9M 4s
      1900K .......... .......... .......... .......... .......... 21% 2.22M 4s
      1950K .......... .......... .......... .......... .......... 21% 13.9M 4s
      2000K .......... .......... .......... .......... .......... 22% 2.06M 4s
      2050K .......... .......... .......... .......... .......... 22% 9.00M 4s
      2100K .......... .......... .......... .......... .......... 23% 1.70M 4s
      2150K .......... .......... .......... .......... .......... 24% 8.34M 4s
      2200K .......... .......... .......... .......... .......... 24% 4.10M 4s
      2250K .......... .......... .......... .......... .......... 25% 45.8M 4s
      2300K .......... .......... .......... .......... .......... 25% 2.98M 4s
      2350K .......... .......... .......... .......... .......... 26% 3.38M 4s
      2400K .......... .......... .......... .......... .......... 26% 7.20M 3s
      2450K .......... .......... .......... .......... .......... 27% 2.54M 3s
      2500K .......... .......... .......... .......... .......... 27% 8.38M 3s
      2550K .......... .......... .......... .......... .......... 28% 5.87M 3s
      2600K .......... .......... .......... .......... .......... 28% 2.14M 3s
      2650K .......... .......... .......... .......... .......... 29% 12.3M 3s
      2700K .......... .......... .......... .......... .......... 30% 24.4M 3s
      2750K .......... .......... .......... .......... .......... 30% 2.94M 3s
      2800K .......... .......... .......... .......... .......... 31% 12.8M 3s
      2850K .......... .......... .......... .......... .......... 31% 5.06M 3s
      2900K .......... .......... .......... .......... .......... 32% 2.42M 3s
      2950K .......... .......... .......... .......... .......... 32% 13.1M 3s
      3000K .......... .......... .......... .......... .......... 33% 3.27M 3s
      3050K .......... .......... .......... .......... .......... 33% 3.71M 3s
      3100K .......... .......... .......... .......... .......... 34% 15.2M 3s
      3150K .......... .......... .......... .......... .......... 34% 4.29M 3s
      3200K .......... .......... .......... .......... .......... 35% 9.36M 3s
      3250K .......... .......... .......... .......... .......... 36% 3.20M 3s
      3300K .......... .......... .......... .......... .......... 36% 15.3M 2s
      3350K .......... .......... .......... .......... .......... 37% 2.41M 2s
      3400K .......... .......... .......... .......... .......... 37% 15.4M 2s
      3450K .......... .......... .......... .......... .......... 38% 3.38M 2s
      3500K .......... .......... .......... .......... .......... 38% 29.8M 2s
      3550K .......... .......... .......... .......... .......... 39% 10.7M 2s
      3600K .......... .......... .......... .......... .......... 39% 2.44M 2s
      3650K .......... .......... .......... .......... .......... 40% 29.3M 2s
      3700K .......... .......... .......... .......... .......... 41% 3.30M 2s
      3750K .......... .......... .......... .......... .......... 41% 3.92M 2s
      3800K .......... .......... .......... .......... .......... 42% 11.2M 2s
      3850K .......... .......... .......... .......... .......... 42% 13.7M 2s
      3900K .......... .......... .......... .......... .......... 43% 19.1M 2s
      3950K .......... .......... .......... .......... .......... 43% 4.71M 2s
      4000K .......... .......... .......... .......... .......... 44% 2.80M 2s
      4050K .......... .......... .......... .......... .......... 44% 1.36M 2s
      4100K .......... .......... .......... .......... .......... 45% 59.3M 2s
      4150K .......... .......... .......... .......... .......... 45% 3.47M 2s
      4200K .......... .......... .......... .......... .......... 46% 16.5M 2s
      4250K .......... .......... .......... .......... .......... 47% 47.9M 2s
      4300K .......... .......... .......... .......... .......... 47% 4.96M 2s
      4350K .......... .......... .......... .......... .......... 48% 49.7M 2s
      4400K .......... .......... .......... .......... .......... 48% 4.45M 2s
      4450K .......... .......... .......... .......... .......... 49% 52.2M 2s
      4500K .......... .......... .......... .......... .......... 49% 4.53M 2s
      4550K .......... .......... .......... .......... .......... 50% 10.4M 2s
      4600K .......... .......... .......... .......... .......... 50% 5.20M 2s
      4650K .......... .......... .......... .......... .......... 51% 9.25M 2s
      4700K .......... .......... .......... .......... .......... 51% 15.2M 2s
      4750K .......... .......... .......... .......... .......... 52% 20.6M 2s
      4800K .......... .......... .......... .......... .......... 53% 5.30M 1s
      4850K .......... .......... .......... .......... .......... 53% 3.42M 1s
      4900K .......... .......... .......... .......... .......... 54% 8.37M 1s
      4950K .......... .......... .......... .......... .......... 54% 5.50M 1s
      5000K .......... .......... .......... .......... .......... 55% 29.6M 1s
      5050K .......... .......... .......... .......... .......... 55% 6.88M 1s
      5100K .......... .......... .......... .......... .......... 56% 6.10M 1s
      5150K .......... .......... .......... .......... .......... 56% 2.54M 1s
      5200K .......... .......... .......... .......... .......... 57% 22.9M 1s
      5250K .......... .......... .......... .......... .......... 57% 4.34M 1s
      5300K .......... .......... .......... .......... .......... 58% 25.2M 1s
      5350K .......... .......... .......... .......... .......... 59% 11.3M 1s
      5400K .......... .......... .......... .......... .......... 59% 9.64M 1s
      5450K .......... .......... .......... .......... .......... 60% 4.76M 1s
      5500K .......... .......... .......... .......... .......... 60% 3.62M 1s
      5550K .......... .......... .......... .......... .......... 61% 1.94M 1s
      5600K .......... .......... .......... .......... .......... 61%  118M 1s
      5650K .......... .......... .......... .......... .......... 62%  245M 1s
      5700K .......... .......... .......... .......... .......... 62% 5.28M 1s
      5750K .......... .......... .......... .......... .......... 63% 9.54M 1s
      5800K .......... .......... .......... .......... .......... 63% 4.48M 1s
      5850K .......... .......... .......... .......... .......... 64% 4.36M 1s
      5900K .......... .......... .......... .......... .......... 65% 90.2M 1s
      5950K .......... .......... .......... .......... .......... 65% 25.0M 1s
      6000K .......... .......... .......... .......... .......... 66% 6.70M 1s
      6050K .......... .......... .......... .......... .......... 66% 5.09M 1s
      6100K .......... .......... .......... .......... .......... 67% 5.74M 1s
      6150K .......... .......... .......... .......... .......... 67% 18.0M 1s
      6200K .......... .......... .......... .......... .......... 68% 2.96M 1s
      6250K .......... .......... .......... .......... .......... 68% 5.93M 1s
      6300K .......... .......... .......... .......... .......... 69% 8.73M 1s
      6350K .......... .......... .......... .......... .......... 69% 4.05M 1s
      6400K .......... .......... .......... .......... .......... 70% 23.5M 1s
      6450K .......... .......... .......... .......... .......... 71% 2.68M 1s
      6500K .......... .......... .......... .......... .......... 71% 2.16M 1s
      6550K .......... .......... .......... .......... .......... 72% 12.3M 1s
      6600K .......... .......... .......... .......... .......... 72% 24.0M 1s
      6650K .......... .......... .......... .......... .......... 73% 29.4M 1s
      6700K .......... .......... .......... .......... .......... 73% 22.0M 1s
      6750K .......... .......... .......... .......... .......... 74% 10.4M 1s
      6800K .......... .......... .......... .......... .......... 74% 33.2M 1s
      6850K .......... .......... .......... .......... .......... 75% 26.3M 1s
      6900K .......... .......... .......... .......... .......... 76% 2.84M 1s
      6950K .......... .......... .......... .......... .......... 76% 20.1M 1s
      7000K .......... .......... .......... .......... .......... 77% 14.1M 1s
      7050K .......... .......... .......... .......... .......... 77% 5.47M 1s
      7100K .......... .......... .......... .......... .......... 78% 24.9M 1s
      7150K .......... .......... .......... .......... .......... 78% 13.4M 1s
      7200K .......... .......... .......... .......... .......... 79% 20.8M 1s
      7250K .......... .......... .......... .......... .......... 79% 8.71M 1s
      7300K .......... .......... .......... .......... .......... 80% 6.86M 1s
      7350K .......... .......... .......... .......... .......... 80% 4.18M 0s
      7400K .......... .......... .......... .......... .......... 81% 8.50M 0s
      7450K .......... .......... .......... .......... .......... 82% 1.63M 0s
      7500K .......... .......... .......... .......... .......... 82% 6.61M 0s
      7550K .......... .......... .......... .......... .......... 83% 1.71M 0s
      7600K .......... .......... .......... .......... .......... 83% 26.5M 0s
      7650K .......... .......... .......... .......... .......... 84% 13.9M 0s
      7700K .......... .......... .......... .......... .......... 84% 7.00M 0s
      7750K .......... .......... .......... .......... .......... 85% 7.90M 0s
      7800K .......... .......... .......... .......... .......... 85% 1.78M 0s
      7850K .......... .......... .......... .......... .......... 86% 3.05M 0s
      7900K .......... .......... .......... .......... .......... 86% 21.1M 0s
      7950K .......... .......... .......... .......... .......... 87% 22.9M 0s
      8000K .......... .......... .......... .......... .......... 88% 3.78M 0s
      8050K .......... .......... .......... .......... .......... 88% 11.4M 0s
      8100K .......... .......... .......... .......... .......... 89% 5.44M 0s
      8150K .......... .......... .......... .......... .......... 89% 5.52M 0s
      8200K .......... .......... .......... .......... .......... 90% 4.06M 0s
      8250K .......... .......... .......... .......... .......... 90% 4.98M 0s
      8300K .......... .......... .......... .......... .......... 91% 27.0M 0s
      8350K .......... .......... .......... .......... .......... 91% 6.65M 0s
      8400K .......... .......... .......... .......... .......... 92% 15.4M 0s
      8450K .......... .......... .......... .......... .......... 92% 21.7M 0s
      8500K .......... .......... .......... .......... .......... 93% 13.0M 0s
      8550K .......... .......... .......... .......... .......... 94% 5.57M 0s
      8600K .......... .......... .......... .......... .......... 94% 3.10M 0s
      8650K .......... .......... .......... .......... .......... 95% 6.72M 0s
      8700K .......... .......... .......... .......... .......... 95% 17.5M 0s
      8750K .......... .......... .......... .......... .......... 96% 4.34M 0s
      8800K .......... .......... .......... .......... .......... 96% 11.6M 0s
      8850K .......... .......... .......... .......... .......... 97% 30.3M 0s
      8900K .......... .......... .......... .......... .......... 97% 8.27M 0s
      8950K .......... .......... .......... .......... .......... 98% 12.1M 0s
      9000K .......... .......... .......... .......... .......... 98% 4.16M 0s
      9050K .......... .......... .......... .......... .......... 99% 18.7M 0s
      9100K .......... .......... .......... .......... ...       100% 23.5M=2.4s
  
    2024-03-21 12:09:10 (3.79 MB/s) - 'wazuh-agent_4.7.3-1_amd64.deb' saved [9362524/9362524]
  
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Created symlink /etc/systemd/system/multi-user.target.wants/wazuh-agent.service → /lib/systemd/system/wazuh-agent.service.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Job for wazuh-agent.service failed because the control process exited with error code.
    See "systemctl status wazuh-agent.service" and "journalctl -xe" for details.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 4 items
  
    modules/testing/tests/test_agent/test_install.py::test_installation PASSED
    modules/testing/tests/test_agent/test_install.py::test_status PASSED
    modules/testing/tests/test_agent/test_install.py::test_version PASSED
    modules/testing/tests/test_agent/test_install.py::test_revision PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ================== 4 passed, 2 warnings in 208.41s (0:03:28) ===================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:09:23] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:09:24] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:09:24] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:09:24] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test registration for agent] *********************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_registration.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:33.676485'
  end: '2024-03-21 13:10:03.431430'
  msg: ''
  rc: 0
  start: '2024-03-21 13:09:29.754945'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 5 items
  
    modules/testing/tests/test_agent/test_registration.py::test_registration PASSED
    modules/testing/tests/test_agent/test_registration.py::test_status PASSED
    modules/testing/tests/test_agent/test_registration.py::test_connection PASSED
    modules/testing/tests/test_agent/test_registration.py::test_isActive PASSED
    modules/testing/tests/test_agent/test_registration.py::test_clientKeys PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 5 passed, 2 warnings in 33.07s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test stop for agent] *****************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_stop.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:12.902437'
  end: '2024-03-21 13:10:22.396558'
  msg: ''
  rc: 0
  start: '2024-03-21 13:10:09.494121'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 1 item
  
    modules/testing/tests/test_agent/test_stop.py::test_stop PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 1 passed, 2 warnings in 12.29s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test restart for agent] **************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_restart.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:11.527947'
  end: '2024-03-21 13:10:42.197323'
  msg: ''
  rc: 0
  start: '2024-03-21 13:10:30.669376'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 5 items
  
    modules/testing/tests/test_agent/test_restart.py::test_restart PASSED
    modules/testing/tests/test_agent/test_restart.py::test_status PASSED
    modules/testing/tests/test_agent/test_restart.py::test_connection PASSED
    modules/testing/tests/test_agent/test_restart.py::test_isActive PASSED
    modules/testing/tests/test_agent/test_restart.py::test_clientKeys PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 5 passed, 2 warnings in 10.93s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}]
No config file found; using defaults

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Test uninstall for agent] ************************************************
changed: [localhost] => changed=true 
  cmd:
  - python3
  - -m
  - pytest
  - modules/testing/tests/test_agent/test_uninstall.py
  - -v
  - --wazuh_version=4.7.3
  - --wazuh_revision=40714
  - --component=agent
  - '--dependencies={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
  - --live=True
  - -s
  delta: '0:00:16.904793'
  end: '2024-03-21 13:11:02.412994'
  msg: ''
  rc: 0
  start: '2024-03-21 13:10:45.508201'
  stderr: |-
    /home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
      warnings.warn((
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = (unset),
            LC_ALL = (unset),
            LC_TIME = "es_ES.UTF-8",
            LC_MONETARY = "es_ES.UTF-8",
            LC_ADDRESS = "es_ES.UTF-8",
            LC_TELEPHONE = "es_ES.UTF-8",
            LC_NAME = "es_ES.UTF-8",
            LC_MEASUREMENT = "es_ES.UTF-8",
            LC_IDENTIFICATION = "es_ES.UTF-8",
            LC_NUMERIC = "es_ES.UTF-8",
            LC_PAPER = "es_ES.UTF-8",
            LANG = "C.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("C.UTF-8").
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Removed /etc/systemd/system/multi-user.target.wants/wazuh-agent.service.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
    Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
  stderr_lines: <omitted>
  stdout: |-
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
    cachedir: .pytest_cache
    rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
    plugins: testinfra-6.0.0, testinfra-10.1.0
    collecting ... collected 3 items
  
    modules/testing/tests/test_agent/test_uninstall.py::test_uninstall PASSED
    modules/testing/tests/test_agent/test_uninstall.py::test_agent_uninstalled_directory PASSED
    modules/testing/tests/test_agent/test_uninstall.py::test_isActive PASSED
  
    =============================== warnings summary ===============================
    modules/provision/models.py:65
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('install', pre=True)
  
    modules/provision/models.py:73
      /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
        @validator('uninstall', pre=True)
  
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ======================== 3 passed, 2 warnings in 16.32s ========================
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:11:02] [DEBUG] ANSIBLE: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py  -v --wazuh_version=4.7.3 --wazuh_revision=40714  --component=agent --dependencies='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:11:02] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:11:02] [DEBUG] ANSIBLE: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml
No config file found; using defaults

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.57.4]

TASK [Clean test directory] ****************************************************
ok: [192.168.57.4] => changed=false 
  path: /tmp/tests
  state: absent

PLAY RECAP *********************************************************************
192.168.57.4               : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'192.168.57.4': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'192.168.57.4': 1}, 'changed': {}}
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml
No config file found; using defaults

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.57.4]

TASK [Clean test directory] ****************************************************
ok: [192.168.57.4] => changed=false 
  path: /tmp/tests
  state: absent

PLAY RECAP *********************************************************************
192.168.57.4               : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
[2024-03-21 13:11:08] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'192.168.57.4': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'192.168.57.4': 1}, 'changed': {}}

@wazuhci wazuhci moved this from Blocked to In progress in Release 4.9.0 Mar 21, 2024
@rauldpm
Copy link
Member

rauldpm commented Mar 21, 2024

Meet resume

  • Error handling: use raise instead of sys.exit
  • Termination_date tag/parameter: the value of this parameter will be the number of expiration days instead of a fixed date.
  • Tag/parameter issue:
    • Remove mandatory tag in AWS (mainly in wazuh-qa)
    • The parameter will not be mandatory in the module.
    • SSH key:
      • In case the issue parameter does not come in the call to the module, the instance_name or some other parameter will be used to create the name of the key.
      • A key will be created per instance that is launched for the QA workflow executions.

@pro-akim
Copy link
Member

pro-akim commented Mar 21, 2024

Update

Tests results in AWS

OS Test result Additional data
redhat9 🟢
redhat7 🔴 AMI failure
redhat8 🟢
centos7 🟢
centos8 🟢
debian10 🟢
debian11 🟢
debian12 🟢
ubuntu20.04 🟢
ubuntu22.04 🟢
oracle9 🟢
amazon2 🟢
amazon2023 🟢
opensuse 🔴 AMI failure
suse15 🟢
redhat7
[2024-03-21 15:41:06] [ERROR] [282453] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-redhat-7-amd64] Task failed with error: Error executing process task Traceback (most recent call last):
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
    main()
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
    Allocator.run(InputPayload(**vars(parse_arguments())))
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
    return cls.__create(payload)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
    instance = provider.create_instance(
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
    return cls._create_instance(base_dir, params, config, ssh_key)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 115, in _create_instance
    instance_id = cls.__create_ec2_instance(config)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 215, in __create_ec2_instance
    instance = client.create_instances(**params)[0]
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/factory.py", line 580, in do_action
    response = action(self, *args, **kwargs)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/action.py", line 88, in __call__
    response = getattr(parent.meta.client, operation_name)(*args, **params)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 535, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 983, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (OptInRequired) when calling the RunInstances operation: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=3jdidj7kpc10apzarpkkyoe3t
opensuse
[2024-03-21 13:48:22] [INFO] [257840] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-opensuse-15-amd64] Starting task.
[2024-03-21 13:48:24] [ERROR] [257840] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-opensuse-15-amd64] Task failed with error: Error executing process task Traceback (most recent call last):
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
    main()
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
    Allocator.run(InputPayload(**vars(parse_arguments())))
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
    return cls.__create(payload)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
    instance = provider.create_instance(
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
    return cls._create_instance(base_dir, params, config, ssh_key)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 115, in _create_instance
    instance_id = cls.__create_ec2_instance(config)
  File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 215, in __create_ec2_instance
    instance = client.create_instances(**params)[0]
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/factory.py", line 580, in do_action
    response = action(self, *args, **kwargs)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/action.py", line 88, in __call__
    response = getattr(parent.meta.client, operation_name)(*args, **params)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 535, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 983, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (OptInRequired) when calling the RunInstances operation: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=147aomaaws9zx4er41jp3mozy

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Mar 21, 2024
@wazuhci wazuhci moved this from Pending review to In review in Release 4.9.0 Mar 21, 2024
pro-akim added a commit that referenced this issue Mar 21, 2024
@pro-akim
Copy link
Member

Update

Changes done. Moved to pending review

@wazuhci wazuhci moved this from In review to Pending review in Release 4.9.0 Mar 21, 2024
pro-akim added a commit that referenced this issue Mar 21, 2024
@wazuhci wazuhci moved this from Pending review to In review in Release 4.9.0 Mar 21, 2024
pro-akim added a commit that referenced this issue Mar 22, 2024
pro-akim added a commit that referenced this issue Mar 22, 2024
@wazuhci wazuhci moved this from In review to Pending final review in Release 4.9.0 Mar 22, 2024
pro-akim added a commit that referenced this issue Mar 22, 2024
pro-akim added a commit that referenced this issue Mar 25, 2024
@wazuhci wazuhci moved this from Pending final review to In final review in Release 4.9.0 Mar 25, 2024
@fcaffieri
Copy link
Member

LGTM

@wazuhci wazuhci moved this from In final review to Done in Release 4.9.0 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants