
Format and syntax highlight Ansible Automation Platform job output for easier debugging and analysis.
Features
- 🎨 Syntax Highlighting - Colors TASK headers, status messages, JSON keys/values, and more
- 📝 Format JSON Output - Automatically formats embedded JSON structures
- 🔄 Python Dict Conversion - Converts Python dictionary notation to properly formatted JSON
- 📦 Collapsible Sections - Makes JSON blocks collapsible for easier navigation
- ✨ Handle Escape Sequences - Properly converts
\n and other escape sequences
- 🚀 One-Click Formatting - Format and highlight with a single keyboard shortcut
Screenshots
Before

After

Installation
From VSCode Marketplace (Recommended)
- Open VSCode
- Press
Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
- Search for "Ansible Output Formatter"
- Click Install
From VSIX File
Download the .vsix file from Releases and install via:
code --install-extension ansible-output-formatter-1.0.x.vsix
| :memo: Installation Note |
Replace the x or the 1.0.x with the correct version to install or that latest version to install see the CHANGELOG.md or tag for the current release number |
Usage
Quick Start
- Open your Ansible job output file (
.txt or rename to .ansible-output)
- Press
Cmd+Shift+F (Mac) or Ctrl+Shift+F (Windows/Linux)
- ✨ Done! Your output is formatted and highlighted
Alternative Methods
Via Command Palette:
- Press
Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
- Type "Format and Highlight Ansible Output"
- Press Enter
Via Right-Click Menu:
- Right-click anywhere in your file
- Select "Format and Highlight Ansible Output"
Commands
All commands are available via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
| Command |
Description |
Format and Highlight Ansible Output |
Formats JSON and applies syntax highlighting (recommended) |
Format Ansible Output |
Only formats the JSON without changing syntax highlighting |
Set Language to Ansible Output |
Only applies syntax highlighting without formatting |
Keyboard Shortcuts
| Shortcut |
Action |
Cmd+Shift+F (Mac)
Ctrl+Shift+F (Windows/Linux) |
Format and Highlight Ansible Output |
Syntax Highlighting Features
The extension highlights:
- ✅ TASK/PLAY headers - Bold, distinctive colors for easy scanning
- ✅ Status keywords -
ok, changed, failed, skipping, fatal, ignored
- ✅ Hostnames - Colored brackets like
[hostname]
- ✅ JSON keys - Property names in distinct colors
- ✅ JSON values - Strings, numbers, booleans, and null values
- ✅ Task paths - File paths with line numbers
- ✅ Ansible keywords -
ansible_facts, item, msg, changed, etc.
Supported File Types
- Ansible Automation Platform 2.x job output
- Red Hat Ansible Tower job output
- AWX job output
- Any text file with Ansible playbook output
Requirements
- Visual Studio Code 1.80.0 or higher
Extension Settings
This extension works out of the box with no configuration required.
Known Issues
- Very large output files (>10MB) may take a few seconds to format
- The extension must be manually triggered for
.txt files (VSCode reserves .txt for plain text)
For more issues, see GitHub Issues
Release Notes
Release Notes
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'Add some AmazingFeature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
Support
License
This extension is licensed under the MIT License.
Author
Scott Parker
Acknowledgments
- Built for the Ansible and DevOps community
- Inspired by daily debugging needs with Ansible Automation Platform
Enjoy easier Ansible debugging! ⚡
If this extension helped you, please consider: