- class fabric.tasks.ConnectionCall(*args, **kwargs)¶
- __init__(*args, **kwargs)¶
Creates a new
Performs minor extensions to
Call– see its docstring for most details. Only specific-to-subclass params are documented here.
init_kwargs (dict) – Keyword arguments used to create a new
Connectionwhen the wrapped task is executed. Default:
- class fabric.tasks.Task(*args, **kwargs)¶
invoke.tasks.Taskwith knowledge of target hosts and similar.
invoke.tasks.Taskrelegates documentation responsibility to its
@taskexpression, so we relegate most details to our version of
@task- please see its docs for details.
New in version 2.1.
- fabric.tasks.task(*args, **kwargs)¶
@taskwith extra kwargs.
the Invoke-level API docsfor most details; this Fabric-specific implementation adds the following additional keyword arguments:
An iterable of host-connection specifiers appropriate for eventually instantiating a
Connection. The existence of this argument will trigger automatic parameterization of the task when invoked from the CLI, similar to the behavior of
This parameterization is “lower-level” than that driven by
--hosts: if a task decorated with this parameter is executed in a session where
--hostswas given, the CLI-driven value will win out.
List members may be one of:
A string appropriate for being the first positional argument to
Connection- see its docs for details, but these are typically shorthand-only convenience strings like
A dictionary appropriate for use as keyword arguments when instantiating a
Connection. Useful for values that don’t mesh well with simple strings (e.g. statically defined IPv6 addresses) or to bake in more complex info (eg
connect_kwargsparams like auth info, etc).
These two value types may be mixed together in the same list, though we recommend that you keep things homogenous when possible, to avoid confusion when debugging.
No automatic deduplication of values is performed; if you pass in multiple references to the same effective target host, the wrapped task will execute on that host multiple times (including making separate connections).
New in version 2.1.