Book Image

Ansible 2 Cloud Automation Cookbook

By : Aditya Patawari, Vikas Aggarwal
Book Image

Ansible 2 Cloud Automation Cookbook

By: Aditya Patawari, Vikas Aggarwal

Overview of this book

Ansible has a large collection of inbuilt modules to manage various cloud resources. The book begins with the concepts needed to safeguard your credentials and explain how you interact with cloud providers to manage resources. Each chapter begins with an introduction and prerequisites to use the right modules to manage a given cloud provider. Learn about Amazon Web Services, Google Cloud, Microsoft Azure, and other providers. Each chapter shows you how to create basic computing resources, which you can then use to deploy an application. Finally, you will be able to deploy a sample application to demonstrate various usage patterns and utilities of resources.
Table of Contents (11 chapters)

Scheduling jobs

There are certain types of jobs that we need to execute periodically; taking a backup is one such job. Ansible allows us to schedule jobs at a set frequency or time.

How to do it...

  1. We can use an existing project and template, or create a new one following the previous recipe.
  2. On the Templates page, for the template that we want to schedule, we should click on the calendar icon.
  3. A page with all the existing schedules will open. Since we are doing this for the first time, it would be empty for us. We need to click the +ADD button here.
  4. Here, we can specify the NAME, START DATE, START TIME, and LOCAL TIME ZONE.
  5. For daily execution, we can set the REPEAT FREQUENCY to Day and set the EVERY field to 1. If we want...