1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-08 19:01:37 +00:00

ssh_config: Add AddressFamily (#11968)

* Add support for AddressFamily parameter in ssh_config.

* Added changelog fragment.

* Update changelog fragment with PR link placeholder

* Fixed formatting.

* Fixed format of changelog fragment.

* Add PR number to changelog fragment.

* Incorporated review findings.

* Typo fix.

Co-authored-by: Felix Fontein <felix@fontein.de>

* Limit to allowed values.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Tobias Jaehnel 2026-05-07 07:32:43 +02:00 committed by GitHub
parent 645dd2d448
commit 4aa38ea336
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 0 deletions

View file

@ -143,6 +143,12 @@ options:
- The values must be strings. Other values are rejected.
type: dict
version_added: 10.4.0
address_family:
description:
- Sets the C(AddressFamily) option.
choices: ['any', 'inet', 'inet6']
type: str
version_added: 13.0.0
requirements:
- paramiko
"""
@ -296,6 +302,7 @@ class SSHConfig:
controlpath=self.params.get("controlpath"),
controlpersist=fix_bool_str(self.params.get("controlpersist")),
dynamicforward=self.params.get("dynamicforward"),
address_family=self.params.get("address_family"),
)
if self.params.get("other_options"):
for key, value in self.params.get("other_options").items():
@ -415,6 +422,7 @@ def main():
dynamicforward=dict(type="str"),
user=dict(type="str"),
user_known_hosts_file=dict(type="str"),
address_family=dict(type="str", choices=["any", "inet", "inet6"]),
),
supports_check_mode=True,
mutually_exclusive=[