From cf0195cac54b8b00334ac78569a5df5bb6fe23bc Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Wed, 3 Nov 2021 12:43:33 +0100 Subject: [PATCH] Enable turning off the Agent 6.14 fix for Windows (#399) Co-authored-by: Pablo Baeyens --- README.md | 1 + defaults/main.yml | 2 ++ tasks/pkg-windows.yml | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28268390..22e25f0d 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ To deploy the Datadog Agent on hosts, add the Datadog role and your API key to y | `datadog_additional_groups` | Either a list, or a string containing a comma-separated list of additional groups for the `datadog_user` (Linux only). | | `datadog_windows_ddagentuser_name` | The name of Windows user to create/use, in the format `\` (Windows only). | | `datadog_windows_ddagentuser_password` | The password used to create the user and/or register the service (Windows only). | +| `datadog_apply_windows_614_fix` | Whether or not to download and apply file referenced by `datadog_windows_614_fix_script_url` (Windows only). See https://dtdg.co/win-614-fix for more details. You can set this to `false` assuming your hosts aren't running Datadog Agent 6.14.\*. | ### Integrations diff --git a/defaults/main.yml b/defaults/main.yml index c8d85e57..55a0d5f2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -130,6 +130,8 @@ datadog_windows_versioned_url: "https://s3.amazonaws.com/ddagent-windows-stable/ # url of the 6.14 fix script. See https://dtdg.co/win-614-fix for more details. datadog_windows_614_fix_script_url: "https://s3.amazonaws.com/ddagent-windows-stable/scripts/fix_6_14.ps1" +# whether or not to download and apply the above fix +datadog_apply_windows_614_fix: true # Override to change the name of the windows user to create datadog_windows_ddagentuser_name: "" diff --git a/tasks/pkg-windows.yml b/tasks/pkg-windows.yml index 96566f4e..0c1a4733 100644 --- a/tasks/pkg-windows.yml +++ b/tasks/pkg-windows.yml @@ -8,13 +8,13 @@ win_get_url: url: "{{ datadog_windows_614_fix_script_url }}" dest: '%TEMP%\fix_6_14.ps1' - when: not datadog_skip_install + when: not datadog_skip_install and datadog_apply_windows_614_fix - name: Run 6.14.0/1 PowerShell fix win_shell: | Set-ExecutionPolicy Bypass -Scope Process -Force &$env:temp\fix_6_14.ps1 - when: not datadog_skip_install + when: not datadog_skip_install and datadog_apply_windows_614_fix - include_tasks: win_agent_latest.yml when: (not datadog_skip_install) and (datadog_agent_windows_version is not defined)