Minesible
Git-driven infrastructure pipeline on AWS
An end-to-end Infrastructure as Code pipeline that provisions AWS infrastructure with OpenTofu and configures the running service with Ansible, orchestrated through Spacelift so a Git push drives the whole deployment.
Architecture
Architecture illustration of the Minesible pipeline: a GitHub repository triggers a Spacelift pipeline, which runs an OpenTofu stack to provision AWS resources and an Ansible stack to configure the server, with state persisted to S3.
1. Source
2. Orchestrate
3. Provision
4. Configure
5. Persist
Select any component marked with a dot to see what it does in this system.
- Provisioning
- OpenTofu
- Configuration
- Ansible
- Orchestration
- Spacelift stacks
- State
- S3-backed
Problem
Standing up a configured server usually splits into two disconnected halves: provisioning the infrastructure, then configuring what runs on it. Doing that by hand means the two drift apart, and outputs from the provisioning step have to be copied into the configuration step manually.
What I built
- OpenTofu configuration that provisions the AWS infrastructure: EC2 compute, S3 storage and IAM roles.
- Ansible playbooks that configure the server after provisioning, keeping configuration management separate from infrastructure definition.
- Spacelift stack dependencies that pass infrastructure outputs from the OpenTofu stack into the Ansible stack automatically, so the two stages stay connected without manual copying.
- Persistent world state backed up to Amazon S3 so the server can be destroyed and recreated without losing data.
- Parameterized infrastructure variables and configurable server properties rather than hardcoded values.
Engineering decisions
Wiring AWS IAM to Spacelift meant getting role assumption right across account boundaries — the failure mode is an opaque permissions error rather than a clear message. Getting outputs to flow between two independent stacks also required modelling the dependency explicitly instead of relying on ordering.
Outcome
A Git push triggers provisioning and configuration end to end, with world state surviving teardown.
Next project
Cisco Modeling Labs on AWS