Overview

Date: 2026-05-11

Time: 15:13

Overview

This page covers FTL2's primary use case: executing automation modules on remote machines via SSH. It walks through setting up a Docker-based SSH target, configuring inventory for SSH connectivity, and running modules remotely. It also explains the internal "gate" mechanism that FTL2 uses to package and ship module code to remote hosts.

Key Concepts

Commands and Syntax

Inventory configuration for SSH:


all:
  hosts:
    remote-server:
      ansible_host: 127.0.0.1
      ansible_port: 2222
      ansible_user: testuser
      ansible_connection: ssh
      ansible_python_interpreter: /usr/bin/python3
      vars:
        ansible_password: testpass

Core remote commands:


ftl2 -m ping -i inventory.yml                      # Test connectivity
ftl2 -m setup -i inventory.yml                     # Gather remote facts
ftl2 -m shell -i inventory.yml -a "cmd='uname -a'" # Run shell command
ftl2 -m file -i inventory.yml -a "path=/tmp/test.txt state=touch"  # Create file
ftl2 -m copy -i inventory.yml -a "src=/tmp/local.txt dest=/tmp/remote.txt"  # Copy file
ftl2 -m file -i inventory.yml -a "path=/tmp/test.txt state=absent" # Remove file

Verbose debugging:


ftl2 -m ping -i inventory.yml -vvv

Inspecting gates:


ls -la /tmp/ftl_gate_*.pyz
echo -n '0000000d["Hello", {}]' | python3 /tmp/ftl_gate_*.pyz

Key inventory fields: ansiblehost, ansibleport (default 22), ansibleuser, ansibleconnection, ansiblepythoninterpreter, vars.ansible_password

Relationships

Exam-Relevant Points