Overview

Date: 2026-05-11

Time: 15:12

Overview

Local execution is FTL2's simplest operational mode, where modules run directly on the same machine via subprocess rather than over SSH. It requires ansible_connection: local in the inventory and uses LocalModuleRunner instead of RemoteModuleRunner. This mode is ideal for development testing, single-machine administration, and learning FTL2 fundamentals without network complexity.

Key Concepts

Commands and Syntax

CLI pattern: ftl2 -m <module> -i <inventory> [-a "<key=value args>"]

| Command | Purpose |

|---------|---------|

| ftl2 -m ping -i inventory.yml | Test connectivity (returns "ping": "pong") |

| ftl2 -m setup -i inventory.yml | Gather system facts (OS, memory, CPU) |

| ftl2 -m file -i inventory.yml -a "path=/tmp/x state=touch" | Create a file |

| ftl2 -m file -i inventory.yml -a "path=/tmp/x state=absent" | Remove a file |

| ftl2 -m shell -i inventory.yml -a "cmd='echo Hello'" | Run a shell command |

| ftl2 -m copy -i inventory.yml -a "src=/tmp/a dest=/tmp/b" | Copy a file |

Inventory configuration:


all:
  hosts:
    localhost:
      ansible_connection: local
      ansible_python_interpreter: /usr/bin/python3

Relationships

Exam-Relevant Points