Skip to main content

A module for interfacing with Ansible Runner and Inventory.

Project description

A python module that interfaces with Ansible Runner and Inventory. Provides an API interface to directly invoke ansible module from python API.


# Introduction<a name=”introduction”></a> If you are not familiar with Ansible, you can read the [Ansible documentation] (http://docs.ansible.com/ansible/index.html). I will assume that you are familiar with Ansible, Ansible playbooks and ansible modules.

To give a very brief introduction: Ansible is an IT automation tool. It is excellent for configuration management, orchestration and deployment. Ansible in some ways surpasses other such tools with it’s simplicity in usage and installation.

So what is pyAnsible pyAnsible is a python module that interfaces with the Ansible.Runner and Ansible.Inventory modules and provides a simple python API that you can invoke to directly access ansible modules.

How is this useful?: The most common way of using playbooks is great for most operations with ansible, but consider some use cases where you want to do discovery for instance, or take action based on the results from output of the ansible modules run on remote hosts.

Some usecases where I have used this module:
  • Given a list of hosts/hypervisors, get all the VMs running on them and check the linux distribution on them.

  • Developed a [remote execution CLI] (https://github.com/bdastur/relic) to execute commands on multiple hosts simultaneously.

  • Check disk utilization on hosts and send a warning email when disk usage exceeds a threshold.

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

pyansible-1.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

pyansible-1.0.2-py2.py3-none-any.whl (13.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyansible-1.0.2.tar.gz.

File metadata

  • Download URL: pyansible-1.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyansible-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0094deed44329be4ab8af15fb894a01517bce94ad77932f1a69524eae141e707
MD5 316c0243d7144897e49bf4bbed99fcc4
BLAKE2b-256 112c97c46d23666a636a7e7665916fbad3adf899fcef4b064adbdcba4dbbc983

See more details on using hashes here.

File details

Details for the file pyansible-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyansible-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4fde64f25b0b9c9fd613733f3e50f83a34d879cf2477d7cd507b080b68811839
MD5 f6082bd4e1e522e173a7805b10f879bc
BLAKE2b-256 70d6e0e637ddb56dd15699d15bb3b0689a8955b34ba19fb89ca1023497f22dfc

See more details on using hashes here.

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