Using Ansible to launch instances
Launching an instance using Ansible is a convenient, platform agnostic method. While we have to specify how to do this for OpenStack, as a particular task, an Ansible playbook could be extended to allow a user to use the same Ansible command to launch an instance on any cloud. This recipe is a very basic introduction to the use of Ansible with OpenStack.
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...
Ansible executes tasks in what is known as a playbook. In this example, we will create a simple task that launches a specific instance called cookbook1
:
- The first step is to create the Ansible playbook ...
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.