Using Ansible to orchestrate software installations across multiple instances

So far, we created playbooks that first launched an instance, and then we extended this in the previous recipe to subsequently install Apache onto the running instance. This recipe describes a playbook that can launch any number of instances, and install Apache onto each of those instances.

Getting ready

Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment that has Ansible installed.

How to do it...

We will extend the previous recipe's playbook to add flexibility to include a variable number of instances.

  1. The basic structure was provided in the previous recipe, so the only play we need to adjust is the first one ...

Get OpenStack Cloud Computing Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.