--- id: ansible-pygments version: "0.1.2" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # ansible-pygments — Tools for building the Ansible Distribution License: permissive · Maintenance: active · Downloads: 159.9K/mo ## What it is and what it does ansible-pygments is a Pygments plugin that adds syntax highlighting support for Ansible command output and a matching color scheme. It registers a lexer named `ansible-output` that recognizes Ansible's structured output format and applies semantic coloring. The package is designed to integrate with any tool that uses Pygments for code highlighting. You install it alongside pygments, then reference the `ansible-output` lexer by name in code blocks or use the `ansible` style in configuration. It depends only on pygments and supports Python 3.9 through 3.13. Use it for: - Highlight Ansible playbook output examples in documentation with semantic color coding. - Format Ansible command logs in technical runbooks for better readability. - Style Ansible output in code snippets embedded in web pages or markdown rendered by pygments. - Improve visibility of Ansible warnings and errors in generated operations documentation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Pygments lexer and style for syntax-highlighting Ansible output, registered globally as `ansible-output` for use in any tool that integrates Pygments. Yes, if you use pygments-based tools to document or display Ansible output. It is actively maintained, has no security issues, and adds a single lightweight dependency. Not necessary if you do not use Pygments-integrated documentation or do not need Ansible-specific highlighting. ## Install pip install ansible-pygments uv add ansible-pygments poetry add ansible-pygments ## Installing ansible-pygments Before you install: Low install friction with a single runtime dependency on pygments. Actively maintained with recent commits and no known vulnerabilities. License in practice: BSD-2-Clause is permissive; you can use this in commercial and proprietary projects with minimal restrictions. Quickstart: pip install ansible-pygments pygments import pygments from pygments.lexers import get_lexer_by_name lexer = get_lexer_by_name('ansible-output') Requires Python 3.9 or later. Verify before relying: - Whether the lexer handles all Ansible output formats (warnings, errors, variable dumps) beyond documented examples. - Performance characteristics when highlighting large Ansible logs or output blocks. - Full integration steps with documentation tools beyond the description excerpt provided. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 159.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ansible output syntax highlighting, pygments lexer ansible, ansible code block formatting, highlight ansible playbook output, ansible syntax coloring, pygments ansible style, ansible output lexer, ansible, syntax-highlighting [View on SkillFed](https://skillfed.io/packages/ansible-pygments) · [View on PyPI](https://pypi.org/project/ansible-pygments/)