CloudAtCost dynamic Ansible inventory script
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

CloudAtCost inventory

This is a dynamic inventory script for Ansible which uses CloudAtCost APIs to generate informations about hosts.


Set the environment variables CAC_API_KEY and CAC_LOGIN and then invoke the script:

$ ./ -h
usage: [-h] (--list | --host HOST)

Produce an Ansible Inventory file based on CloudAtCost

optional arguments:
  -h, --help   show this help message and exit
  --list       List active servers
  --host HOST  List details about the specific host

Extra vars

It's possible to define extra vars using the Notes section in CloudAtCost panel.

Unfortunately that field does not support new lines, but you can use __CAC__ as separator to specify multiple variables inline; e.g.:

ansible_user=myuser__CAC__ansible_variable=foo__CAC__ansible_variable2=big foo


Donations via Liberapay or Bitcoin (1Ph3hFEoQaD4PK6MhL3kBNNh9FZFBfisEH) are always welcomed, thank you!