Pygments lexer and style Ansible snippets
This project provides a Pygments lexer that is able to handle
Ansible output. It may be used anywhere Pygments is integrated.
The lexer is registered globally under the name ansible-output.
It also provides a Pygments style for tools needing to highlight code snippets.
The code is licensed under the terms of the BSD 2-Clause license.
Using the lexer in Sphinx
Make sure this library in installed in the same env as your Sphinx
automation via pip install ansible-pygments sphinx. Then, you should
be able to use a lexer by its name ansible-output in the code blocks
of your RST documents. For example:
.. code-block:: ansible-output
[WARNING]: Unable to find '/nosuchfile' in expected paths (use -vvvvv to see paths)
ok: [localhost] => {
"msg": ""
}
Using the style in Sphinx
It is possible to just set ansible in conf.py and it will "just
work", provided that this project is installed alongside Sphinx as
shown above.
pygments_style = 'ansible'
Metadata
Release files for ansible-pygments 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ansible_pygments-0.1.2.tar.gz | 9.5 kB | With provenance | Details for ansible_pygments-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ansible_pygments-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for ansible_pygments-0.1.2-py3-none-any.whl |
Total release size: 17.1 kB
Release files / ansible_pygments-0.1.2.tar.gz
| Download URL | ansible_pygments-0.1.2.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8c0c54c2f0237367b722f02941dfc52ecc850cb669b0e2ca842d0c0b8a7262d
|
|
BLAKE2b-256 checksum How to use checksums |
9951a4af927232a613ea20d52bfd465bf23b6a95d3a29611ab2fb78f1782e51f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2025.
Transparency logRelease files / ansible_pygments-0.1.2-py3-none-any.whl
| Download URL | ansible_pygments-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0be5c7a99c15ac3a28905052705e1eb9d0eec9a4f5135ca35c8547e983a82382
|
|
BLAKE2b-256 checksum How to use checksums |
d21036038f188023eac8a4f9fe3ca85bfb69b07690f34ed701d9bd1ad0f405bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2025.
Transparency logSecurity for ansible-pygments 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ansible_pygments-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.