From ac50ee90c09bba0ff9896e226a5e7c9232a1e52f Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Fri, 9 Aug 2024 15:26:27 +1000 Subject: [PATCH] winrm - Remove extras lookups Removed the extras variable lookups for the winrm connection plugin. All valid options are explicitly documented and will no longer be looked up with the ansible_winrm_* variable names. This should have any impact of people using these variables as all existing options have been explicitly defined and will continue to work as before. --- changelogs/fragments/winrm-extras.yaml | 2 + lib/ansible/plugins/connection/winrm.py | 228 +++++++++++++++----- test/units/plugins/connection/test_winrm.py | 86 ++++---- 3 files changed, 225 insertions(+), 91 deletions(-) create mode 100644 changelogs/fragments/winrm-extras.yaml diff --git a/changelogs/fragments/winrm-extras.yaml b/changelogs/fragments/winrm-extras.yaml new file mode 100644 index 00000000000..50be3fd3e01 --- /dev/null +++ b/changelogs/fragments/winrm-extras.yaml @@ -0,0 +1,2 @@ +minor_changes: + - winrm - Documented all valid winrm connection plugin options instead of relying on the extras var lookup. diff --git a/lib/ansible/plugins/connection/winrm.py b/lib/ansible/plugins/connection/winrm.py index 1d50ad891da..4bd156e9464 100644 --- a/lib/ansible/plugins/connection/winrm.py +++ b/lib/ansible/plugins/connection/winrm.py @@ -10,15 +10,12 @@ DOCUMENTATION = """ short_description: Run tasks over Microsoft's WinRM description: - Run commands or put/fetch on a target via WinRM - - This plugin allows extra arguments to be passed that are supported by the protocol but not explicitly defined here. - They should take the form of variables declared with the following pattern C(ansible_winrm_