Skip to main content

Ansible Developers Box

Project description

andebox

PyPI - Version PyPI - Python Version PyPI - Downloads Last Commit

Build Status docs codecov

andebox is a script to assist Ansible developers by encapsulating some boilerplate tasks, especially the ability of running tests from the root directory of the collection project without any additional setup.

andebox integration test demo

Highlights

Setup-less ansible-test

No need to clone in specific locations or keep track of env variables. Simply clone whichever collection you want and run the ansible-test command as:

$ andebox test sanity -- --docker default --test validate-modules plugins/modules/mymodule.py
$ andebox test units -- --docker default test/units/plugins/modules/mymodule.py
$ andebox test integration -- --docker default mymodule

If you want to test your code against multiple versions of ansible-core or other component, you will like the tox-test subcommand as well.

Stats on ignore files

Gathering stats from the ignore files can be quite annoying, especially if they are long. One can run:

$ andebox ignores -s2.20 -fc validate-modules:parameter-state-invalid-choice
     1  plugins/modules/consul_session.py validate-modules:parameter-state-invalid-choice
     1  plugins/modules/osx_defaults.py validate-modules:parameter-state-invalid-choice
     1  plugins/modules/parted.py validate-modules:parameter-state-invalid-choice
     1  plugins/modules/rhevm.py validate-modules:parameter-state-invalid-choice

Runtime config

Quickly peek what is the runtime.yml status for a specific module:

$ andebox runtime scaleway_ip_facts
D modules scaleway_ip_facts: deprecation in 3.0.0 (current=2.4.0): Use community.general.scaleway_ip_info instead.

Or using a regular expression:

$ andebox runtime -r 'gc[pe]' | head -5
R lookup gcp_storage_file: redirected to community.google.gcp_storage_file
T modules gce: terminated in 2.0.0: Use google.cloud.gcp_compute_instance instead.
R modules gce_eip: redirected to community.google.gce_eip
R modules gce_img: redirected to community.google.gce_img
R modules gce_instance_template: redirected to community.google.gce_instance_template

where D=Deprecated, T=Tombstone, R=Redirect.

Run Integration Tests in Vagrant VMs

To run integration tests inside a VM managed by vagrant:

# Run test in VM named "fedora37" using sudo
$ andebox vagrant -n fedora37 -s -- --python 3.9 xfs_quota --color yes

andebox does not manage your Vagrantfile. The user is responsible for creating and setting up the VM definition.

Installation

Install it as usual:

pip install andebox

If you use pipx (strongly recommended), you may use:

pipx install andebox

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

andebox-2.0.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

andebox-2.0.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file andebox-2.0.0.tar.gz.

File metadata

  • Download URL: andebox-2.0.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for andebox-2.0.0.tar.gz
Algorithm Hash digest
SHA256 5573951ae2ac4692343c3f5833e3db053676364b89fcf12e5ee4df37705e2ed1
MD5 465fa73ab6f501d4b6b0d715d005a164
BLAKE2b-256 933c453597ba6d47ee55dba11e7cc1d108d17fa1757adfb900c3c6b2eadcc302

See more details on using hashes here.

Provenance

The following attestation bundles were made for andebox-2.0.0.tar.gz:

Publisher: release.yml on russoz-ansible/andebox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file andebox-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: andebox-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for andebox-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 910f687706557314178e19bdb246987277bb3b6f00cd96a5081d92046471f309
MD5 179859e061de25d6d4d5451466ad15f9
BLAKE2b-256 3713da36a3867f24707a6803be3b2d45adebe3a8110c377a0d753937a2467cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for andebox-2.0.0-py3-none-any.whl:

Publisher: release.yml on russoz-ansible/andebox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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