Ansible has relatively few prerequisites that are not installed on most Linux- and macOS-based systems. However, there are a few steps to follow before we can use Ansible for managing our OpenStack environment.
Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment. Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack.
The version of Ansible 2.x requires Python 2.6 or 2.7. Most modern Linux distributions and macOS/OS X have this already installed. If you were able to successfully execute the openstack
commands as described in Chapter 2, The OpenStack Client, then you're good to go here.
You may need to install Shade. Shade is a simple client library for interacting with OpenStack clouds. Red Hat and CentOS environments don't have this installed by default. Install it with the following command:
sudo pip install shade
As we're performing this on our client machine, ensure that you have the necessary permissions to install software. When ready, carry out the following steps depending on your chosen operating system.
For Ubuntu, we can use the Ansible PPA as follows:
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update sudo apt-get install ansible
3.136.17.252