Skip to main content
Help us improve Python packaging – donate today!

Suitable is a thin wrapper around the Ansible API.

Project Description



This package is experimental, don’t use in production.

Suitable is not affiliated with Ansible and not supported by it.

Use at your own risk.

The endorsed way to use the official Ansible API is documented here:


from suitable import Api

# creates the user 'denis' on both hosts
hosts = Api(['', ''])

# creates the user 'postgres' on
dbhost = Api('')

# returns a list of mounts on the given servers

# connects to the given server with a specific user/pass
from getpass import getpass
username = 'admin'
password = getpass()

api = Api('', remote_user=username, remote_pass=password)
print api.command('whoami')['contacted']['']['stdout']

>>> admin

Why Suitable?

Because ‘ansible’ is derived from ‘answerable’ whose archaic definitions include ‘suitable’. So not much thought went into it.

Are there tests, docs?

Few tests, we use this so far for our internal deploy and server update scripts, so the code is actually run in production if you will - but it’s an experiment because we’ve been using a number of ways to drive ansible within scripts and we’re not yet sure this is it. We’ll add more over time as the interface stabilizes.

No docs, there are a number of comments if you bother to read the source, but there’s no guide and no readthedocs page. If this module makes sense to anyone else, we’ll add more!

More information

All the heavy lifting is done by Ansible. To get a list of Api arguments have a look at the Runner class found in

To get an overview of all the methods provided by the api have a look at the list of Ansible modules:

The file module for instance includes the following example:

- file: path=/etc/foo.conf owner=foo group=foo mode=0644

This can easily be translated to the suitable api:

api.file(path='/etc/foo.conf', owner='foo', group='foo', mode='0644')


0.3 (2014-05-28)

  • Adds a stern warning so users won’t confuse this with the official Ansible API. [href]

0.2 (2014-05-21)

  • Change license to GPL v3 as required by Ansible. [href]

0.1 (2014-05-21)

  • Initial release. [href]

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
suitable-0.3.tar.gz (18.4 kB) Copy SHA256 hash SHA256 Source None May 28, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page