-
Notifications
You must be signed in to change notification settings - Fork 223
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
Don't fail if the package is already installed on Windows #465
base: main
Are you sure you want to change the base?
Conversation
by default, Ansible allows following msiexec.exe exit codes: - `0` for success - `3010` for "reboot required" state but there is another code, [1603](https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/msi-installation-error-1603), for cases, when the package is installed already. This change will allow Ansible to proceed in theese cases.
The error code 1603 is described as
Why should be considered a success case? |
Ansible should not be running the MSI if the same version of the Agent is already installed. What version the Datadog Agent installer and what version of Ansible are you using? |
@clarkb7 I'm using Ansible 2.14.3 and the latest role version from Galaxy
I looked through the code, and the logic that are you talking about works only if |
I'm sorry I should have linked the source in my previous message. The ansible Are you able to share a small ansible playbook that reproduces the behavior you are experiencing? I have not been able to reproduce it myself. it looks like there was a bugfix related to this code in ansible.windows 1.4. You can check which version you are using by running this command:
|
I tried today, and it still fails on one Windows host:
The full log contains a lot of unreadable data, I won't copy it here. ➜ ansible-galaxy collection list ansible.windows
# ./lib/python3.9/site-packages/ansible_collections
Collection Version
--------------- -------
ansible.windows 1.13.0
# ~/.ansible/collections/ansible_collections
Collection Version
--------------- -------
ansible.windows 2.1.0 The playbook is simple: - hosts: all
tasks:
- name: install datadog
include_role:
name: datadog.datadog |
Debug log file is human-unreadable because of its size, but here are the last lines:
You can see there: |
I found other cases, when 1603 can be returned; it looks like it can be expected always
@clarkb7 I still have this issue, what can I do to push this forward somehow? |
@soar Can you run the MSI with more verbose logging options
|
by default, Ansible allows following msiexec.exe exit codes:
0
for success3010
for "reboot required" statebut there is another code - 1603, for cases, when the package is installed already. This change allows Ansible to proceed in these cases.