Ansible's Rackspace Dynamic Inventory Plugin

The Rackspace dynamic inventory plugin is a powerful tool.

How do I install it?

Installing inventory plugins isn’t intuitive, and the documentation available on this process isn’t immediately clear. The instructions found on this page Ansible Documentation can be adapted for the Rackspace plugin.

It boils down to this for the Rackspace plugin:

Grab the latest version of rax.py from the plugins/inventory folder on GitHub. Raw GitHub Link

Place this file on your Ansible master. The location doesn’t matter that much, but convention says to put it in /etc/ansible/rax.py.

Make this script executable by issuing chmod +x /etc/ansible/rax.py.

As the user that runs Ansible, create the following file at ~/.rackspace_cloud_credentials: (Be sure to replace the appropriate values with your Rackspace username and apikey.)