community.general
community.general copied to clipboard
ssh_config: support general options via options dict
Summary
The supported options are limited.
It would be helpful to be able to specify all possible options via a other_options
dictionary or so.
This is e.g. also done in https://github.com/linux-system-roles/ssh
Issue Type
Feature Idea
Component Name
ssh_config
Additional Information
To my knowledge there is no way to specify, options such as
ServerAliveInterval
ServerAliveCountMax
ForwardX11
ForwardX11Trusted
GSSAPIAuthentication
GSSAPIDelegateCredentials
PreferredAuthentications
PubkeyAuthentication
LocalForward
CanonicalizeHostname
CanonicalDomains
HostKeyAlias
to name just a few.
If a dict like other_options
would be added the roles becomes more flexible and there is no need to add the individual options separately. One could just do something like and get the desired entry.
- name: Add a host in the configuration
community.general.ssh_config:
user: akasurde
host: "example.com"
hostname: "github.com"
identity_file: "/home/akasurde/.ssh/id_rsa"
port: '2223'
state: present
other_options:
LocalForward: "8889 localhost:8888"
HostKeyAlias: "abc"
ForwardX11Trusted: "yes"
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct