Ansible Interactive Playground

Write, test, and learn Ansible with real-time feedback and comprehensive examples!

Real-time Validation Save & Load Execution History 25+ Examples Code Snippets
Found auto-saved playbook from previous session. Load it?
Save Playbook
Load Saved
Snippets
History
Tutorial Mode
Export
Playbook Editor
--- - name: My First Playbook hosts: localhost gather_facts: yes tasks: - name: Print a message debug: msg: "Hello from Ansible!" - name: Show system information debug: msg: "Running on "
Inventory
localhost ansible_connection=local
Note: For security, playbooks run in check mode (dry-run). No actual changes are made to the system.
Output
Waiting for playbook execution...
  • Use debug module to print messages and variables
  • Start with gather_facts: yes to access system info
  • Use when conditions to control task execution
  • Use loop or with_items for iteration
  • Keep indentation consistent (2 spaces recommended)
  • Use become: yes for sudo operations
  • Ctrl/Cmd + / - Comment/uncomment lines
  • Ctrl/Cmd + F - Find in editor
  • Ctrl/Cmd + H - Find and replace
  • Ctrl/Cmd + S - Save playbook
  • Ctrl/Cmd + Enter - Run playbook
  • Tab - Auto-indent (use 2 spaces for YAML)
  • Ctrl/Cmd + D - Duplicate line