Tools for building the Ansible Distribution
Project description
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'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansible-pygments-0.1.0a2.tar.gz
.
File metadata
- Download URL: ansible-pygments-0.1.0a2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b978963a958068d716b92495e93f3ffddcd42b0df50ca74cdc669e1a0c564f82 |
|
MD5 | 9afbe55ba165f57d176e6f5e47d251c0 |
|
BLAKE2b-256 | 06d794609207e28f6eca47953ef71f8dc73b493b03a1a037c6f151e9812fb029 |
File details
Details for the file ansible_pygments-0.1.0a2-py3-none-any.whl
.
File metadata
- Download URL: ansible_pygments-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c2b600bf2c286536e7e74608aaffb7da13ab954a37547f29046be277adc2df |
|
MD5 | a63f2c0a4193d7a7de17b0843d2dcd56 |
|
BLAKE2b-256 | bd2f3af42a03517ee25e4f5bd9a2b110f37f73339fc0f9cc3a98649aa08e1fd5 |