Overview

Date: 2026-05-11

Time: 15:19

Overview

The FTL2 Examples page provides a guided tour of FTL2's capabilities through five progressive examples, covering local execution, remote SSH, multi-host deployments, FTL modules (in-process Python execution), and event streaming. It includes prerequisites, common commands, troubleshooting, and a recommended learning path for new users.

Key Concepts

Commands and Syntax

Installation


cd /path/to/faster-than-light2
python -m venv .venv
source .venv/bin/activate
pip install -e .
ftl2 --version

Core CLI Commands


ftl2 -m ping -i inventory.yml                         # Ping hosts
ftl2 -m setup -i inventory.yml                        # Gather system facts
ftl2 -m shell -i inventory.yml -a "cmd='whoami'"      # Run shell command
ftl2 -m file -i inventory.yml -a "path=/tmp/test state=touch"  # Create file
ftl2 -m copy -i inventory.yml -a "src=/local/file dest=/remote/file"  # Copy file

Host Targeting


ftl2 -m ping -i inventory.yml --limit webservers      # Target group
ftl2 -m ping -i inventory.yml --limit web01            # Target host
ftl2 -m ping -i inventory.yml --limit "web*"           # Pattern match
ftl2 -m ping -i inventory.yml --limit "!databases"     # Exclude hosts

FTL Module Execution (Python API)


uv run python example_local.py
uv run python example_remote.py

Docker Environment Management


./setup.sh start | stop | status | logs | restart

Relationships

Exam-Relevant Points