TractorStackdocs
Docs menu

Docs / Build your stack

Ansible

Planned design. TractorStack is in development. This page describes how it is designed to work; nothing here is available to install yet. See the roadmap for the status of each part.

Ansible configures everything inside the machines that OpenTofu creates. It connects over SSH, so there is no agent to install or keep updated on each host, and it describes the desired state in plain YAML files that live in your Git repository.

What it is planned to do

The design splits the work into roles, each one small enough to read in a few minutes:

Role in each stage

StageMain Ansible work
1Harden one host, install Docker, set up PostgreSQL and RustFS, schedule backups
2Same roles on a second host, set up the streaming replica, off-site copies
3Install and upgrade the Kubernetes cluster; data VMs unchanged
4Node preparation and cluster upgrades; most data services move to operators

Inventory from OpenTofu

Hosts are not listed by hand. The plan is to generate the inventory from OpenTofu outputs, grouped by role, so a new VM appears in the right group as soon as it exists.

Planned configuration

A planned example of the top-level playbook. Names and layout may change.

# Planned example only: ansible/site.yml
- hosts: all
  become: true
  roles:
    - baseline        # CIS-style hardening
    - docker

- hosts: postgres
  become: true
  roles:
    - postgresql
    - pgbackrest

- hosts: k8s_nodes    # stage 3 and later
  become: true
  roles:
    - kubernetes   # self-managed cluster, installed and upgraded by Ansible

Dry runs and idempotence

Before any change on a production host you can run ansible-playbook site.yml --check --diff. Check mode reports what would change without changing it, and --diff shows the file differences. Every role is meant to be idempotent: running it a second time on a host that is already correct should report zero changes. A run that keeps reporting changes is treated as a bug in the role.

Tags are also planned on each task so you can run just one part, for example only the SSH settings, and so that tasks can later be linked to compliance controls Exploring.

What stays yours

Limits and caveats

Last updated 25 October 2026 · Questions or corrections: sales@infratractor.com