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

Module not upgrading agents on Windows #374

Closed
mike406 opened this issue Aug 10, 2021 · 2 comments
Closed

Module not upgrading agents on Windows #374

mike406 opened this issue Aug 10, 2021 · 2 comments
Assignees

Comments

@mike406
Copy link

mike406 commented Aug 10, 2021

For Windows computers that already have a previous version of Wazuh agent installed, the agents are not automatically upgraded when the version is different. The new MSI shows up in C:\Temp but is not actually installed/upgraded over the old installation.

Changing ensure to use the MSI version resolves this problem. I hardcoded 4.1.5 but a new variable should be established that uses the MSI version number.

      -> package { $agent_package_name:
        ensure          => "4.1.5",
        provider        => 'windows',
        source          => "${download_path}\\wazuh-agent-${agent_package_version}.msi",
        install_options => [
          '/q',
          "WAZUH_MANAGER=${wazuh_reporting_endpoint}",
          "WAZUH_PROTOCOL=${ossec_protocol}",
        ],
      }
Info: Applying configuration version '1628613757'
Notice: /Stage[main]/Wazuh::Agent/File[wazuh-agent]/ensure: defined content as '{md5}50455229db051712fef18eb7cda1ce65'
Notice: /Stage[main]/Wazuh::Agent/Package[Wazuh Agent]/ensure: ensure changed '4.0.4' to '4.1.5'
@vcerenu vcerenu self-assigned this Sep 20, 2021
@vcerenu
Copy link
Member

vcerenu commented Sep 21, 2021

Hi Mike
I was able to replicate the error that was generated, I was doing some tests and the change that is required would be the following

      -> package { $agent_package_name:
        ensure          => "${agent_package_version}",
        provider        => 'windows',
        source          => "${download_path}\\wazuh-agent-${agent_package_version}.msi",
        install_options => [
          '/q',
          "WAZUH_MANAGER=${wazuh_reporting_endpoint}",
          "WAZUH_PROTOCOL=${ossec_protocol}",
        ],
      }

I need to carry out some more tests on this change to confirm that it does not cause problems to other functionalities and then it will be included in a next release

@vcerenu
Copy link
Member

vcerenu commented Nov 2, 2021

Hi Mike

I proceed to close this Issue since this change was implemented for version v4.2.4

@vcerenu vcerenu closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants