ansible.netcommon.libssh – (Tech preview) Run tasks using libssh for ssh connection

Note

This plugin is part of the ansible.netcommon collection (version 1.4.1).

To install it use: ansible-galaxy collection install ansible.netcommon.

To use it in a playbook, specify: ansible.netcommon.libssh.

New in version 2.10: of ansible.netcommon

Synopsis

  • Use the ansible-pylibssh python bindings to connect to targets
  • The python bindings use libssh C library (https://www.libssh.org/) to connect to targets
  • This plugin 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:

[libssh_connection]
host_key_auto_add = None

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

[defaults]
host_key_checking = yes

[libssh_connection]
host_key_checking = yes

env:ANSIBLE_HOST_KEY_CHECKING
env:ANSIBLE_SSH_HOST_KEY_CHECKING
env:ANSIBLE_LIBSSH_HOST_KEY_CHECKING
var: ansible_host_key_checking
var: ansible_ssh_host_key_checking
var: ansible_libssh_host_key_checking
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:

[libssh_connection]
look_for_keys = yes

env:ANSIBLE_LIBSSH_LOOK_FOR_KEYS
TODO: write it
password
string
var: ansible_password
var: ansible_ssh_pass
var: ansible_ssh_password
var: ansible_libssh_pass
var: ansible_libssh_password
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:

[libssh_connection]
proxy_command =

env:ANSIBLE_LIBSSH_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:

[libssh_connection]
pty = yes

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

[defaults]
remote_user = None

[libssh_connection]
remote_user = None

env:ANSIBLE_REMOTE_USER
env:ANSIBLE_LIBSSH_REMOTE_USER
var: ansible_user
var: ansible_ssh_user
var: ansible_libssh_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 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/netcommon/libssh_connection.html