What is the Ansible Playground?

The Ansible Playground at app.ansiblebyexample.com is a free, browser-based environment where you can write and run Ansible playbooks without installing anything on your machine.

Whether you're a complete beginner or an experienced engineer testing a quick idea, the playground lets you:

  • Write playbooks in a full-featured code editor
  • Run them instantly against a sandboxed environment
  • See real output — just like running ansible-playbook locally
  • Share your work with colleagues or students

Why Use an Ansible Playground?

No Installation Required

Setting up Ansible locally means installing Python, pip, configuring SSH keys, and managing virtual environments. The playground skips all of that — open your browser and start writing YAML.

Safe to Experiment

Running playbooks against production hosts can be risky. The playground provides an isolated sandbox where mistakes are harmless and learning is fast.

Perfect for Learning

If you're following tutorials on AnsibleByExample, you can immediately test the examples in the playground.

Playbook workflow

Generate a complete playbook from this tutorial

Use Ansible Playground: Practice Ansible Online for Free as the starting context and generate an editable Ansible playbook in the playground.

One anonymous generation is available. Do not paste passwords, private keys, tokens, or customer secrets.

Generate a playbook

Getting Started

  1. Go to app.ansiblebyexample.com
  2. Write your playbook in the editor
  3. Click Run to execute
  4. Review the output

Example: Your First Playbook

---
- name: Hello World Playbook
  hosts: localhost
  connection: local
  tasks:
    - name: Print a greeting
      ansible.builtin.debug:
        msg: "Hello from the Ansible Playground!"

    - name: Gather basic facts
      ansible.builtin.setup:
        filter: ansible_os_family

    - name: Show OS family
      ansible.builtin.debug:
        msg: "Running on {{ ansible_os_family }}"

What Can You Do in the Playground?

FeatureSupported
Run playbooks against localhost✅
Use built-in modules (debug, copy, file, template, etc.)✅
Test Jinja2 filters and expressions✅
Practice with variables, loops, and conditionals✅
Use ansible-vault✅
Connect to remote hosts❌ (sandbox only)

Who Is It For?

  • Students learning Ansible for the first time
  • DevOps engineers testing quick snippets before running in production
  • Instructors demonstrating Ansible concepts in workshops
  • Interview candidates practicing for automation-related interviews

Next Steps

The Ansible Playground is part of the AnsibleByExample project by Luca Berton, helping thousands of engineers learn Ansible through practical, hands-on examples.