Infrastructure Script Testing
Test Ansible playbooks, shell scripts, and provisioning configs on a real server
Test Ansible playbooks, shell scripts, or cloud-init configs on a fresh server. Validate they converge. Run them twice to check idempotency.
This is one of gibil's strongest differentiators. It's a real server with a real kernel, not a container pretending to be one. Drive it with any MCP-capable agent or by hand. Examples use Claude because that's what we test against.
With your agent (MCP)
With gibil's MCP server wired up (setup):
Forge a clean VM, run my Ansible playbook, then run it again to verify it's
idempotent (changed=0 on the second pass). Report any drift.create_server({ name: "config-test", ttl: 15 })
vm_write({ server: "config-test", path: "/root/playbook.yml", content: "..." })
vm_bash({ server: "config-test", command: "apt-get install -y ansible && ansible-playbook /root/playbook.yml" })
// → { exit_code: 0, stdout: "changed=12 ..." }
vm_bash({ server: "config-test", command: "ansible-playbook /root/playbook.yml" })
// → { exit_code: 0, stdout: "changed=0 ..." } ← idempotent
destroy_server({ name: "config-test" })vm_write is handy here: the agent drops the playbook or script straight onto the box without git.
By hand (CLI)
gibil create --name config-test --ttl 15
gibil run config-test "apt-get install -y ansible && ansible-playbook /root/project/playbook.yml" --json
# → {"exit_code": 0, "stdout": "changed=12 ..."}
# run again to check idempotency
gibil run config-test "ansible-playbook /root/project/playbook.yml" --json
# → {"exit_code": 0, "stdout": "changed=0 ..."}
gibil destroy config-testOr upload and run a local script directly:
gibil exec config-test --script ./setup.sh --jsongibil exec base64-encodes the script, transfers it, runs it, and returns structured output. Safe for any script type.
What you can test
- Ansible playbooks and roles: full convergence testing
- Shell provisioning scripts:
setup.sh,bootstrap.sh, install sequences - Cloud-init configs: validate user-data scripts
- Package install sequences: apt, npm, pip in the right order
- Service configuration: systemctl, nginx, postgres
- Firewall rules: iptables, ufw on a real network stack
Why gibil
Scripts that pass here will pass on production Linux servers. Scripts that pass in a container might not.
- Real OS: Ubuntu 24.04 with systemd, real networking, real package management
- Root access: no permission workarounds
- Ephemeral: destructive tests are safe, the server burns after
Every gibil server runs Ubuntu 24.04. If your production target is a different OS, results may differ, but for the vast majority of Linux provisioning, this is a faithful test environment.
Next steps
- AI Agent via MCP: wire up the MCP server
- CLI:
gibil exec: upload and run scripts - Bug Reproduction: clean-state debugging