Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is connection type smart removed or deprecated and what is the default connection type? #1360

Open
dilyanpalauzov opened this issue Apr 27, 2024 · 2 comments

Comments

@dilyanpalauzov
Copy link

dilyanpalauzov commented Apr 27, 2024

#1042#1258 has removed some contradictions on connection types smart and paramiko.

https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_9.html#id45 says „the ‘smart’ option for setting a connection plugin is being removed as its main purpose (choosing between ssh and paramiko) is now irrelevant.“

But ansible:lib/ansible/playbook/attribute.py line 187 still handles the smart connection type, falling back to paramiko, when the latter is installed. So this type is not removed, but deprecated.

Despite connection type smart, introduced in Ansible 2.1 and removed per Porting Guide 9, in Ansible 1.2.1 the logic was to select intelligently between ssh and paramiko. The current documentation still hints that the intelligent selection between ssh and paramiko is done:

documentation:docs/docsite/rst/inventory_guide/connection_details.rst line 12 says “If your control machine uses an older version of OpenSSH that does not support ControlPersist, Ansible will fall back to a Python implementation of OpenSSH called 'paramiko'.” → implies smart connection.

documentation:docs/docsite/rst/reference_appendices/faq.rst:

Switch your default connection type in the configuration file to ``ssh``, or use ``-c ssh`` to use
Native OpenSSH for connections instead of the python paramiko library. In Ansible 1.2.1 and later, ``ssh`` will be used
by default if OpenSSH is new enough to support ControlPersist as an option.

We keep paramiko as the default as if you are first installing Ansible on these enterprise operating systems, it offers a better experience for new users.

The above states twice, that the default is paramiko, or after Ansible 1.2.1 the default is what smart does.

ansible:lib/ansible/config/base.yml line 1054: “There is also a (DEPRECATED) special 'smart' option, that will toggle between 'ssh' and 'paramiko' depending on controller OS and ssh versions.” → No, the option is not deprecated, it is removed per porting_guide_9, but ansible/utils/ssh_functions.py still checks for this value.

All that said, the documentation is not very clear on what is the default: ssh and fallback to paramiko, or ssh, letting users willing paramiko to be explicit. It is also unclear if connection type smart is removed or deprecated.

@ansible-documentation-bot ansible-documentation-bot bot added the needs_triage Needs a first human triage before being processed. label Apr 27, 2024
@oraNod
Copy link
Contributor

oraNod commented Apr 30, 2024

@Akasurde Hey! Could you please take a look at this issue and provide some guidance / input?

@flowerysong
Copy link
Contributor

flowerysong commented May 2, 2024

the ‘smart’ option for setting a connection plugin is being removed as its main purpose (choosing between ssh and paramiko) is now irrelevant. is part of the "Deprecated Features" portion of the porting guide, indicating that it is a deprecation. Final removal would be listed in the "Removed Features" section.

The current state is that it is deprecated and the default is ssh, as noted in the config (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-transport). The other references are outdated.

@samccann samccann removed the needs_triage Needs a first human triage before being processed. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants