W3cubDocs

/Ansible 2.10

ansible.builtin.paramiko_ssh – Run tasks via python ssh (paramiko)

Note

This module is part of ansible-base and included in all Ansible installations. In most cases, you can use the short module name paramiko_ssh even without specifying the collections: keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

New in version 0.1: of ansible.builtin

Synopsis

  • Use the python ssh implementation (Paramiko) to connect to targets
  • The paramiko transport is provided because many distributions, in particular EL6 and before do not support ControlPersist in their SSH implementations.
  • This is needed on the Ansible control machine to be reasonably efficient with connections. Thus paramiko is faster for most users on these platforms. Users with ControlPersist capability can consider using -c ssh or configuring the transport in the configuration file.
  • This plugin also borrows a lot of settings from the ssh plugin as they both cover the same protocol.

Parameters

Parameter Choices/Defaults Configuration Comments
host_key_auto_add
boolean
    Choices:
  • no
  • yes
ini entries:

[paramiko_connection]
host_key_auto_add = None

env:ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
TODO: write it
host_key_checking
boolean
    Choices:
  • no
  • yes
ini entries:

[defaults]
host_key_checking = yes

[paramiko_connection]
host_key_checking = yes

added in 2.5 of ansible.builtin
env:ANSIBLE_HOST_KEY_CHECKING
env:ANSIBLE_SSH_HOST_KEY_CHECKING
added in 2.5 of ansible.builtin
env:ANSIBLE_PARAMIKO_HOST_KEY_CHECKING
added in 2.5 of ansible.builtin
var: ansible_host_key_checking
added in 2.5 of ansible.builtin
var: ansible_ssh_host_key_checking
added in 2.5 of ansible.builtin
var: ansible_paramiko_host_key_checking
added in 2.5 of ansible.builtin
Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
look_for_keys
boolean
    Choices:
  • no
  • yes
ini entries:

[paramiko_connection]
look_for_keys = yes

env:ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
TODO: write it
password
string
var: ansible_password
var: ansible_ssh_pass
var: ansible_ssh_password
var: ansible_paramiko_pass
var: ansible_paramiko_password
added in 2.5 of ansible.builtin
Secret used to either login the ssh server or as a passphrase for ssh keys that require it
Can be set from the CLI via the --ask-pass option.
proxy_command
string
Default:
""
ini entries:

[paramiko_connection]
proxy_command =

env:ANSIBLE_PARAMIKO_PROXY_COMMAND
Proxy information for running the connection via a jumphost
Also this plugin will scan 'ssh_args', 'ssh_extra_args' and 'ssh_common_args' from the 'ssh' plugin settings for proxy information if set.
pty
boolean
    Choices:
  • no
  • yes
ini entries:

[paramiko_connection]
pty = yes

env:ANSIBLE_PARAMIKO_PTY
TODO: write it
record_host_keys
boolean
    Choices:
  • no
  • yes
ini entries:

[paramiko_connection]
record_host_keys = yes

env:ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
TODO: write it
remote_addr
string
Default:
"inventory_hostname"
var: ansible_host
var: ansible_ssh_host
var: ansible_paramiko_host
Address of the remote target
remote_user
string
ini entries:

[defaults]
remote_user = None

[paramiko_connection]
remote_user = None

added in 2.5 of ansible.builtin
env:ANSIBLE_REMOTE_USER
env:ANSIBLE_PARAMIKO_REMOTE_USER
added in 2.5 of ansible.builtin
var: ansible_user
var: ansible_ssh_user
var: ansible_paramiko_user
User to login/authenticate as
Can be set from the CLI via the --user or -u options.
use_persistent_connections
boolean
    Choices:
  • no
  • yes
ini entries:

[defaults]
use_persistent_connections = no

env:ANSIBLE_USE_PERSISTENT_CONNECTIONS
Toggles the use of persistence for connections

Authors

  • Ansible Core Team

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/paramiko_ssh_connection.html