Skip to main content

A pip-like ansible collection installer.

Project description

ansible-dev-environment

A pip-like install for ansible collections.

Features

  • Promotes an "ephemeral" development approach
  • Ensures the current development environment is isolated
  • Install all collection python requirements
  • Install all collection test requirements
  • Checks for missing system packages
  • Symlinks the current collection into the current python interpreter's site-packages
  • Install all collection collection dependencies into the current python interpreter's site-packages

By placing collections into the python site-packages directory they are discoverable by ansible as well as python and pytest.

Communication

  • Join the Ansible forum:

    • Get Help: get help or help others. Please add appropriate tags if you start new discussions.
    • Social Spaces: gather and interact with fellow enthusiasts.
    • News & Announcements: track project-wide announcements including social events.
    • Bullhorn newsletter: used to announce releases and important changes.

For more information about communication, see the Ansible communication guide.

Usage

Setting up a development environment

$ pip install ansible-dev-environment --user
$ git clone <collection_repo>
$ cd <collection_repo>
$ ade install -e .\[test] --venv .venv
INFO: Found collection name: network.interfaces from /home/bthornto/github/network.interfaces/galaxy.yml.
INFO: Creating virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Using specified interpreter: /home/bthornto/github/network.interfaces/venv/bin/python
INFO: Requirements file /home/bthornto/github/network.interfaces/requirements.txt is empty, skipping
INFO: Installing python requirements from /home/bthornto/github/network.interfaces/test-requirements.txt
INFO: Installing ansible-core.
INFO: Initializing build directory: /home/bthornto/github/network.interfaces/build
INFO: Copying collection to build directory using git ls-files.
INFO: Running ansible-galaxy to build collection.
INFO: Running ansible-galaxy to install collection and it's dependencies.
INFO: Removing installed /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces
INFO: Symlinking /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces to /home/bthornto/github/network.interfaces
WARNING: A virtual environment was specified but has not been activated.
WARNING: Please activate the virtual environment:
source venv/bin/activate

Tearing down the development environment

$ ade uninstall ansible.scm
INFO     Found collection name: ansible.scm from /home/bthornto/github/ansible.scm/galaxy.yml.
INFO     Requirements file /home/bthornto/github/ansible.scm/requirements.txt is empty, skipping
INFO     Uninstalling python requirements from /home/bthornto/github/ansible.scm/test-requirements.txt
INFO     Removed ansible.utils: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/utils
INFO     Removed ansible.utils*.info: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible.utils-2.10.3.info
INFO     Removed ansible.scm: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/scm
INFO     Removed collection namespace root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible
INFO     Removed collection root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections

Help

ade --help

ade install --help

ade uninstall --help

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

ansible_dev_environment-25.5.0.tar.gz (79.7 kB view details)

Uploaded Source

Built Distribution

ansible_dev_environment-25.5.0-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

Details for the file ansible_dev_environment-25.5.0.tar.gz.

File metadata

  • Download URL: ansible_dev_environment-25.5.0.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ansible_dev_environment-25.5.0.tar.gz
Algorithm Hash digest
SHA256 eda6b18dc8084c053bfaac9ec92a52812d2932c55200ddf9bec1ebf6d2fc0d28
MD5 8a0efa55ca137a02de7f1875017253a2
BLAKE2b-256 1e0d1e8cf80f57b41074585e5a77b03025fa48100996ddd387abeb057f911ab0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_dev_environment-25.5.0.tar.gz:

Publisher: release.yml on ansible/ansible-dev-environment

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

File details

Details for the file ansible_dev_environment-25.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansible_dev_environment-25.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a140d9e7506696c55a26e8daa89ff8ef73d643d341db118262a4ef2d5de3b8ff
MD5 dc0ea4f21837c66bc024c7c0f8dba0bd
BLAKE2b-256 dffb93f3f39aae24aec5122ee2097dd611149d23f9b00572a8c8cac6dd756ab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_dev_environment-25.5.0-py3-none-any.whl:

Publisher: release.yml on ansible/ansible-dev-environment

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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page