File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 19
19
- name : Get Windows Agent config
20
20
win_shell : |
21
21
$installer = new-object -comobject WindowsInstaller.Installer
22
- $agent_item = (Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" -EA 0 | Where { $_.DisplayName -like "Datadog Agent*" }).PSChildName
22
+ $uninstall_key = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
23
+ $agent_item = (Get-ItemProperty $uninstall_key -EA 0 | Where { $_.DisplayName -like "Datadog Agent*" }).PSChildName
23
24
if (!$agent_item) {
24
25
return
25
26
}
30
31
}
31
32
Write-Host $f
32
33
}
33
- register : datadog_windows_agent_active_config
34
+ register : agent_windows_active_config
34
35
35
36
# NOTE: We don't set DD Password Arg here to prevent it from being printed;
36
37
# we set it right before using agent_win_install_args
122
123
# when the agent is 7.45+
123
124
when : >-
124
125
(agent_datadog_skip_install and (agent_datadog_major | int <= 7) and (agent_datadog_minor | int < 45)) and
125
- (("NPM" in datadog_windows_agent_active_config .stdout_lines) != agent_datadog_sysprobe_enabled)
126
+ (("NPM" in agent_windows_active_config .stdout_lines) != agent_datadog_sysprobe_enabled)
You can’t perform that action at this time.
0 commit comments