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

Contradictions in documentation about paramiko being the default #1042

Closed
dilyanpalauzov opened this issue Jan 13, 2024 · 12 comments
Closed
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers MUNI tech writers new_contributor This PR is the first contribution by a new community member.

Comments

@dilyanpalauzov
Copy link

https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-paramiko contains:

By default, Ansible manages machines over SSH. The library that Ansible uses by default to do this is a Python-powered library called paramiko. The paramiko library is generally fast and easy to manage, though users who want to use Kerberos or Jump Hosts may wish to switch to a native SSH binary such as OpenSSH by specifying the connection type in their playbooks, or using the -c ssh flag.

This means, that unless explicitly changed, Paramiko is used by default. But https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html#controlpersist-and-paramiko states the opposite: prefer openssh over paramiko and there is no explicit configuration necessary to get openssh over paramiko.

Also https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_9.html#id20 says for Ansible-core 2.9:

the ‘smart’ option for setting a connection plugin is being removed as it’s main purpose (choosing between ssh and paramiko) is now irrelevant.

But https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#connection-plugins still contains:

Ansible version 2.1 introduced the smart connection plugin. The smart connection type allows Ansible to automatically select either the paramiko or openssh connection plugin based on system capabilities, or the ssh connection plugin if OpenSSH supports ControlPersist.

without stating that smart is gone.

Finally https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#connecting-to-hosts-behavioral-inventory-parameters says for ansible_connection:

Connection type to the host. This can be the name of any Ansible connection plugin. SSH protocol types are smart, ssh or paramiko. The default is smart. Non-SSH based types are described in the next section.

So smart does not exist, but is the default for ansible_connection.

@ansible-documentation-bot ansible-documentation-bot bot added needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. labels Jan 13, 2024
@ansible-documentation-bot
Copy link
Contributor

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.

@oraNod oraNod added the DaWGs Good discussion item for the DaWGs label Jan 15, 2024
@oraNod
Copy link
Contributor

oraNod commented Jan 15, 2024

Thanks for reporting this and providing all the details @dilyanpalauzov I've added the DaWGs label so we can discuss it tomorrow. You're welcome to join us on Matrix at https://matrix.to/#/#docs:ansible.com

@oraNod oraNod added good first issue Good for newcomers and removed needs_triage Needs a first human triage before being processed. labels Jan 16, 2024
@oraNod
Copy link
Contributor

oraNod commented Jan 16, 2024

Labelling this as a good first issue after discussion in DaWGs. If any contributors are interested in working on this, and need some guidance on how to proceed, get in touch on Matrix at https://matrix.to/#/#docs:ansible.com

@samccann samccann added the documentation Improvements or additions to documentation label Jan 22, 2024
@oraNod
Copy link
Contributor

oraNod commented Jan 23, 2024

This blog post could be helpful in resolving this issue: https://www.ansible.com/blog/new-libssh-connection-plugin-for-ansible-network

@gotmax23
Copy link
Collaborator

https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-paramiko contains:

By default, Ansible manages machines over SSH. The library that Ansible uses by default to do this is a Python-powered library called paramiko. The paramiko library is generally fast and easy to manage, though users who want to use Kerberos or Jump Hosts may wish to switch to a native SSH binary such as OpenSSH by specifying the connection type in their playbooks, or using the -c ssh flag.

This means, that unless explicitly changed, Paramiko is used by default. But https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html#controlpersist-and-paramiko states the opposite: prefer openssh over paramiko and there is no explicit configuration necessary to get openssh over paramiko.

Yeah, this doc is out of date. paramiko is no longer the default; the ssh connection plugin is.

@gotmax23
Copy link
Collaborator

Connection type to the host. This can be the name of any Ansible connection plugin. SSH protocol types are smart, ssh or paramiko. The default is smart. Non-SSH based types are described in the next section.

So smart does not exist, but is the default for ansible_connection.

It should be "SSH protocols types are ssh or paramiko" and "The default is ssh," if I'm not mistaken.

@gotmax23
Copy link
Collaborator

the ‘smart’ option for setting a connection plugin is being removed as it’s main purpose (choosing between ssh and paramiko) is now irrelevant.

I also submitted ansible/ansible#82594 to fix this spelling error.

@oraNod
Copy link
Contributor

oraNod commented Mar 20, 2024

Estimated effort: S (MUNI tech writers)

@Devids10
Copy link
Contributor

Devids10 commented Apr 8, 2024

Hello! I would like to work with this issue. I am from the MUNI tech writing course

@oraNod
Copy link
Contributor

oraNod commented Apr 8, 2024

Hello @Devids10 and welcome! I've assigned the issue to you now. Please feel free to ask any questions here or head over to the docs channel on Matrix.

@samccann samccann removed the DaWGs Good discussion item for the DaWGs label Apr 23, 2024
oraNod added a commit that referenced this issue Apr 25, 2024
MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042
patchback bot pushed a commit that referenced this issue Apr 25, 2024
MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042

(cherry picked from commit 499f415)
patchback bot pushed a commit that referenced this issue Apr 25, 2024
MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042

(cherry picked from commit 499f415)
patchback bot pushed a commit that referenced this issue Apr 25, 2024
MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042

(cherry picked from commit 499f415)
patchback bot pushed a commit that referenced this issue Apr 25, 2024
MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042

(cherry picked from commit 499f415)
oraNod added a commit that referenced this issue Apr 25, 2024
…/499f41550814fa9b9d3af7cf072c9cae35db270c/pr-1258

[PR #1258/499f4155 backport][stable-2.15] MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042
oraNod added a commit that referenced this issue Apr 25, 2024
…/499f41550814fa9b9d3af7cf072c9cae35db270c/pr-1258

[PR #1258/499f4155 backport][stable-2.14] MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042
oraNod added a commit that referenced this issue Apr 25, 2024
…/499f41550814fa9b9d3af7cf072c9cae35db270c/pr-1258

[PR #1258/499f4155 backport][stable-2.16] MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042
oraNod added a commit that referenced this issue Apr 25, 2024
…/499f41550814fa9b9d3af7cf072c9cae35db270c/pr-1258

[PR #1258/499f4155 backport][stable-2.17] MUNI_TECH_WRITERS: Paramiko contradictions, issue #1042
@oraNod oraNod closed this as completed Apr 25, 2024
@dilyanpalauzov
Copy link
Author

Should in examples/scripts/uptime.py this also be updated?

    context.CLIARGS = ImmutableDict(connection='smart', …)

oraNod added a commit to oraNod/ansible-documentation that referenced this issue Apr 25, 2024
oraNod added a commit to oraNod/ansible-documentation that referenced this issue Apr 25, 2024
@oraNod
Copy link
Contributor

oraNod commented Apr 25, 2024

Should in examples/scripts/uptime.py this also be updated?

    context.CLIARGS = ImmutableDict(connection='smart', …)

Thanks for catching this @dilyanpalauzov I've fixed it in a follow up PR and also removed another smart reference from the FAQ. Please feel free to comment #1340

patchback bot pushed a commit that referenced this issue May 2, 2024
patchback bot pushed a commit that referenced this issue May 2, 2024
patchback bot pushed a commit that referenced this issue May 2, 2024
patchback bot pushed a commit that referenced this issue May 2, 2024
samccann pushed a commit that referenced this issue May 2, 2024
(cherry picked from commit e16dbd3)

Co-authored-by: Don Naro <dnaro@redhat.com>
samccann pushed a commit that referenced this issue May 6, 2024
(cherry picked from commit e16dbd3)

Co-authored-by: Don Naro <dnaro@redhat.com>
samccann pushed a commit that referenced this issue May 6, 2024
(cherry picked from commit e16dbd3)

Co-authored-by: Don Naro <dnaro@redhat.com>
samccann pushed a commit that referenced this issue May 6, 2024
(cherry picked from commit e16dbd3)

Co-authored-by: Don Naro <dnaro@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers MUNI tech writers new_contributor This PR is the first contribution by a new community member.
Projects
Status: Done
Development

No branches or pull requests

5 participants