mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
winrm scheme default behaviour (#34908)
This commit is contained in:
parent
19ab882790
commit
9d9c117580
1 changed files with 8 additions and 1 deletions
|
@ -48,8 +48,9 @@ DOCUMENTATION = """
|
||||||
scheme:
|
scheme:
|
||||||
description:
|
description:
|
||||||
- URI scheme to use
|
- URI scheme to use
|
||||||
|
- If not set, then will default to C(https) or C(http) if I(port) is
|
||||||
|
C(5985).
|
||||||
choices: [http, https]
|
choices: [http, https]
|
||||||
default: https
|
|
||||||
vars:
|
vars:
|
||||||
- name: ansible_winrm_scheme
|
- name: ansible_winrm_scheme
|
||||||
path:
|
path:
|
||||||
|
@ -195,7 +196,13 @@ class Connection(ConnectionBase):
|
||||||
self._become_pass = self._play_context.become_pass
|
self._become_pass = self._play_context.become_pass
|
||||||
|
|
||||||
self._winrm_port = self.get_option('port')
|
self._winrm_port = self.get_option('port')
|
||||||
|
|
||||||
self._winrm_scheme = self.get_option('scheme')
|
self._winrm_scheme = self.get_option('scheme')
|
||||||
|
# old behaviour, scheme should default to http if not set and the port
|
||||||
|
# is 5985 otherwise https
|
||||||
|
if self._winrm_scheme is None:
|
||||||
|
self._winrm_scheme = 'http' if self._winrm_port == 5985 else 'https'
|
||||||
|
|
||||||
self._winrm_path = self.get_option('path')
|
self._winrm_path = self.get_option('path')
|
||||||
self._kinit_cmd = self.get_option('kerberos_command')
|
self._kinit_cmd = self.get_option('kerberos_command')
|
||||||
self._winrm_transport = self.get_option('transport')
|
self._winrm_transport = self.get_option('transport')
|
||||||
|
|
Loading…
Add table
Reference in a new issue