Skip to content

Commit 73043a3

Browse files
committed
fix ansible lint errors
1 parent 14dcaf8 commit 73043a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tasks/pkg-windows-opts.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
- name: Get Windows Agent config
2020
win_shell: |
2121
$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
2324
if (!$agent_item) {
2425
return
2526
}
@@ -30,7 +31,7 @@
3031
}
3132
Write-Host $f
3233
}
33-
register: datadog_windows_agent_active_config
34+
register: agent_windows_active_config
3435

3536
# NOTE: We don't set DD Password Arg here to prevent it from being printed;
3637
# we set it right before using agent_win_install_args
@@ -122,4 +123,4 @@
122123
# when the agent is 7.45+
123124
when: >-
124125
(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)

0 commit comments

Comments
 (0)