Skip to main content

Ansible Debug Adapter Protocol Implementation

Project description

Ansibug

Test workflow codecov License

The core component of the Ansible Debug Adapter Protocol used for debugging Ansible playbooks. See more documentation for ansibug at https://jborean93.github.io/ansibug/.

Please note this library should be considered a preview. New features and behaviour changes should be expected during this preview period.

Debug Adapter

This library combined with a Debug Adapter Protocol client, like Visual Studio Code, can be used to run and debug Ansible playbook's interactively. It supports basic features like stepping in, over, and out of tasks in a play with support for getting and setting variables at runtime.

ansible_example

More information about the debug adapter and debugging experience of Ansible can be found under the docs.

Requirements

The following Python requirements must be met before using this library:

  • Python 3.9+ (dependent on ansible-core support)
  • ansible-core >= 2.14.0

The debugger aims to continue to support the current ansible-core versions that have no reached End Of Life. See the ansible-core support matrix to see the current versions and the control node python versions for those versions. There are no guarantees that all features will be supported across Ansible versions, new features might be reliant on changes only present in newer Ansible versions. Any such features will be explicitly called out in the documentation.

Installation

This library has been published on PyPI and can be installed with:

python -m pip install ansibug

To test out the changes locally run the following:

git clone https://github.com/jborean93/ansibug.git

python -m pip install -e .[dev]
pre-commit install

This will install the current code in editable mode and also include some development libraries needed for testing or other development features.

Testing

This library uses tox to run the sanity and integration tests. Once the dev extras for this library has been installed, all the tests can be run by running the tox command.

As the support matrix for this library can take some time to run it might be beneficial to run only certain tests. The following factors are available in tox

  • sanity
  • py3{9,10,11,12}
  • ansible_{2.14,2.15,2.16,devel}

Here are some example factors that can be invoked with tox:

# Run only the sanity tests
tox run -f sanity

# Run Ansible 2.16 on all its supported Python versions
tox run -f ansible_2.16

# Run Python 3.12 on all the supported Ansible versions
tox run -f py312

# Run Ansible 2.16 tests on Python 3.12
tox run -f py312 ansible_2.16

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansibug-0.1.0.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

ansibug-0.1.0-py3-none-any.whl (64.4 kB view details)

Uploaded Python 3

File details

Details for the file ansibug-0.1.0.tar.gz.

File metadata

  • Download URL: ansibug-0.1.0.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ansibug-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a77eb316d5ab45eb24d57ede34b0872d0c07447f7d56b3a9f933d167272ddbbe
MD5 a986a934dff0e7b692ff0e81819f217f
BLAKE2b-256 1e4f601512905aa55463ca9c65eab9d81153d461b2bf166e64bc97739a31539c

See more details on using hashes here.

File details

Details for the file ansibug-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ansibug-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 64.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ansibug-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e82c1820597b1e1ea2fa76e045b0c2809ce5a327ff788e891df1b6563d63d297
MD5 89c09e4d7d30bd3560e5b4302bd38e13
BLAKE2b-256 da43ac92d800465c7c0bf47e28c409a69f762226f6bbf485a7ac584cb130f1b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page