Built-in Tools¶
Import built-in tools from rmote.tools. Pass a tool method and its arguments
to Connection or Protocol to execute it on the connected host.
Module tools such as facts expose functions called in the same way.
Tools use that connection’s user permissions and the programs installed there.
FileSync.upload/download and Rsync.upload/download coordinate local and remote files:
call them directly with an open async Protocol. See FileSync and Rsync.
Agent.forward is an async context manager called directly. It connects an
agent and a listener on independently selected endpoints. See Agent.
facts.fetch(remote, ...) collects host state through an open async connection;
await remote(facts.gather, ...) collects it in one remote call. See Facts.
Each page documents the tool’s operations first, followed by its related types. See Quickstart for a complete deployment example and Writing Tools for defining your own tools.
What a tool needs from its target¶
A tool that reads a kernel interface of Linux, or runs the program of one
distribution, refuses on another target with NotImplementedError. The message
names the operation, what it needs and what the host is, because the failure
travels through RPC and the caller sees nothing else:
Sysctl.get needs the /proc/sys interface of Linux, and this host runs Darwin
Service needs the systemctl program of systemd, and this host has none
AptRepository.absent needs /etc/apt of Debian and Ubuntu, and this host has none
Tool |
Needs |
|---|---|
|
any POSIX target |
|
POSIX Unix sockets; an existing SSH agent on the selected agent endpoint |
|
|
|
the |
|
the |
|
the shadow utilities for users and groups; |
|
|
|
|
|
a pseudo terminal of POSIX for a terminal session; the pipe mode needs none |
The checks live in Platform requirements. A tool of your own can use them for the same message.
Files and templates
Commands and services
Packages and repositories