You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/backends.rst
+57
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,63 @@ system packaged tools may still be required). For example ::
13
13
For all backends, commands can be run as superuser with the ``--sudo``
14
14
option or as specific user with the ``--sudo-user`` option.
15
15
16
+
General Host specification
17
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+
19
+
The ``--hosts`` parameter in Testinfra is used to specify the target hosts for the tests.
20
+
21
+
You can specify multiple hosts by separating each target with a comma, allowing you to run tests using different backends across different environments or machines.
22
+
23
+
The user, password, and port fields are optional, providing flexibility depending on your authentication and connection requirements.
24
+
25
+
Please also read the details for the individual backends, as the host spec is handled slightly differently from backend to backend.
* ``<backend>``: type of backend to be used (e.g., ssh, docker, paramiko, local)
37
+
* ``<user>``: username for authentication (optional)
38
+
* ``<password>``: password for authentication (optional)
39
+
* ``<host>``: target hostname or IP address
40
+
* ``<port>``: target port number (optional)
41
+
42
+
Special characters (e.g. ":") in the user and password fields need to be percent-encoded according to RFC 3986. This can be done using ``urllib.parse.quote()`` in Python.
0 commit comments