• New module “environment” for getting remote environment variables
  • New module “block_device” exposing block device informations
  • Add a global flag –force-ansible to the command line
  • Raise an error in case of missing ansible inventory file
  • Fix an escape issue with ansible ssh args set inventory or configuration file


  • ssh connections uses persistent connections by default. You can disable this by passing controlpersist=0 to the connections options.
  • ansible ssh connections now use ssh backend instead of paramiko. ansible_ssh_common_args and ansible_ssh_extra_args are now taking in account.
  • Add a new ansible connection options “force_ansible”, when set to True, testinfra will always call ansible for all commands he need to run.
  • Handle all ansible connections types by setting force_ansible=True for connections which doesn’t have a testinfra equivalent connection (for example “network_cli”).


  • Issue full command logging using DEBUG log level to avoid logging sensible data when log level is INFO.
  • Fix possible crash when parsing ansible inventories #470
  • Support using alternative kubeconfig file in kubectl connections #460
  • Support parsing ProxyCommand from ssh_config for paramiko connections


  • Set default timeout to 10s on ssh/paramiko connections
  • Add support for ansible inventory parameter ansible_private_key_file


  • Add support for ansible lxc and lxd connections


  • Fix paramiko parsing RequestTTY from ssh configs
  • Re-add “groups” key from ansible.get_variables() to be backward compatible with testinfra 2.X


  • Fix ansible with no inventory resolving to “localhost”
  • Fix support for ansible 2.8 with no inventory
  • Fix ansible/paramiko which wasn’t reading hosts config from ~/.ssh/config
  • Allow to pass –ssh-config and –ssh-identity-file to ansible connection


  • Fix parsing of ipv6 adresses for paramiko, ssh and ansible backends.
  • Fix –connection=ansible invocation when no hosts are provided


  • New ansible backend fixing support for ansible 2.8 and license issue. See for details. This make ansible using testinfra native backends and only works for local, ssh or docker connections. I you have others connection types or issues, please open a bug on
  • Windows support is improved. “package” module is handled with Chocolatey and there’s support for the “user” module.


  • docker: new get_containers() classmethod
  • socket: fix parsing of ipv6 addresses with new versions of ss
  • service: systemd fallback to sysv when “systemctl is-active” is not working


  • Add addr module, used to test network connectivity
  • Drop deprecated “testinfra” command, you should use “py.test” instead
  • Drop deprecated top level fixtures, access them through the fixture “host” instead.
  • Drop support for ansible <= 2.4


  • Add docker module
  • Fix pytest 4 compatibility


  • Allow to urlencode character in host specification “user:pass@host” (#387)
  • Fix double logging from both pytest and testinfra
  • Drop support for python 2.6
  • Allow to configure timeouts for winrm backend


  • Add support for ansible “become” user in ansible module
  • Add failed/suceeded property on run() output


  • packaging: Use setuptools_scm instead of pbr
  • iptables: add ip6tables support
  • sysctl: find sysctl outside of PATH (/sbin)


  • Fix finding ss and netstat command in “sbin” paths for Centos (359)
  • Add a workaround for
  • Handle “starting” status for Service module on Alpine linux
  • Fix no_ssl and no_verify_ssl options for WinRM backend


  • Fix multi-host test ordering (#347), regression introduced in 1.13.1
  • Fix Socket on OpenBSD hosts (#338)


  • Add a new lxc backend
  • Socket: fix is_listening for unix sockets
  • Add namespace and container support for kubernetes backend
  • Add a cache of parsed ansible inventories for ansible backend
  • Service: fix service detection on Centos 6 hosts
  • File: implement file comparison with string paths


  • package: fix is_installed and version behavior for uninstalled packages (#321 and #326)
  • ansible: Use predictibles test ordering when using pytest-xdist to fix random test collections errors (#316)


  • socket: fix detection of udp listening sockets (#311)
  • ssh backend: Add support for GSSAPI


  • ansible: fix compatibility with ansible 2.5
  • pip: fix compatibility with pip 10 (#299)


  • Socket: fix error with old versions of ss without the –no-header option (#293)


  • Fix bad error reporting when using ansible module without ansible backend (#288)
  • Socket: add a new implementation using ss instead of netstat (#124)
  • Add service, process, and systeminfo support for Alpine (#283)


  • Fix get_variables() for ansible>=2.0,<2.4 (#274)
  • Paramiko: Use the RequireTTY setting if specified in a provided SSHConfig (#247)


  • New iptables module


  • Fix running testinfra within a suite using doctest (#268)
  • Service: add is_valid method for systemd
  • Fix file.linked_to() for Mac OS


  • Interface: allow to find ‘ip’ command ousite of PATH
  • Fix –nagios option with python 3


  • Deprecate testinfra command (will be dropped in 2.0), use py.test instead #135
  • Handle –nagios option when using py.test command


  • Support for ansible 2.4 (#249)


  • Salt: allow specifiy config directory (#230)
  • Add a WinRM backend
  • Socket: ipv6 sockets can handle ipv4 clients (#234)
  • Service: Enhance upstart detection (#243)


  • Service: add is_enabled() support for OpenBSD
  • Add ssh identity file option for paramiko and ssh backends
  • Expand tilde (~) to user home directory for ssh-config, ssh-identity-file and ansible-inventory options


  • Service: Allow to find ‘service’ command outside of $PATH #211
  • doc fixes


  • Fix unwanted deprecation warning when running tests with pytest 3.1 #204


  • Fix wheel package for 1.6.1


  • Support ansible 2.3 with python 3 (#197)



  • backends: Fix ansible backend with ansible >= 2.3 (#195)


  • backends: fallback to UTF-8 encoding when system encoding is ASCII.
  • Service: fix is_running() on systems using Upstart


  • Sudo: restore backend command in case of exceptions


  • Honnor become_user when using the ansible backend


  • Add dependency on importlib on python 2.6


  • New kubectl backend
  • Command: check_output strip carriage return and newlines (#164)
  • Package: rpm improve getting version() and release()
  • User: add gecos (comment) field (#155)


  • SystemInfo: detect codename from VERSION_CODENAME in /etc/os-release (fallback when lsb_release isn’t installed).
  • Package: add release property for rpm based systems.