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.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

pyansible-1.0.1-py2.py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 2 Python 3

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