talira

Agentless infrastructure automation in plain Python, over SSH

open sourceMITfree

pyinfra turns Python code into shell commands and runs them on servers over SSH, concurrently and idempotently, with no agent on the hosts (they need only a shell). Deploys and inventories are plain Python files, so loops and conditions are ordinary code instead of YAML, and operations such as apt.packages, files.template and systemd.service read like nouns and verbs. A --dry run shows a per-host diff of every change before anything runs, and results stream back in parallel from one host to thousands. Connectors target SSH servers, the local machine, Docker and Podman containers, chroots and more, and generate inventory from Terraform or Vagrant.

Problems it solves

  • configure servers with Python instead of Ansible's YAML playbooks
  • run the same shell commands on many servers over SSH in parallel
  • preview exactly what a deploy will change on each server before running it
  • automate server setup without installing an agent on the hosts
  • provision Docker containers and remote servers with the same deploy code
  • replace a slow Ansible setup with something faster

Features

  • Deploys and inventories written in plain Python
  • Agentless: hosts need only a shell and SSH
  • Concurrent execution over SSH, built on gevent
  • Idempotent operations
  • --dry runs with a per-host diff
  • Realtime streaming output
  • Connectors for SSH, local, Docker, Podman, chroot and more
  • Inventory from Terraform and Vagrant
  • Custom operations and connectors

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what pyinfra does.

  1. Ansible A radically simple IT automation system
  2. Salt Software to automate the management and configuration of infrastructure and applications at scale
  3. Chef Infra Powerful policy-based configuration management system software
  4. Puppet Configuration management that continuously enforces the desired state of your infrastructure
  5. Semaphore UI Modern UI and powerful API for Ansible, Terraform/OpenTofu/Terragrunt, PowerShell and other DevOps tools
  6. AWX A web-based user interface, REST API and task engine built on top of Ansible

Compare pyinfra with the top 3