Luca Berton
Ansible for VMware by Examples
A Step-by-Step Guide to Automating Your VMware Infrastructure
The Apress logo.
Luca Berton
Czechia, Czech Republic
ISBN 978-1-4842-8878-8 e-ISBN 978-1-4842-8879-5
https://doi.org/10.1007/978-1-4842-8879-5
Luca Berton 2023
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
For my son Filippo, the joy of my life.
Preface
This book is a guide to automating your VMware infrastructure using the Ansible open source technology.
If you are an IT professional in information technology in any industry and you would like a jargon-free understanding of Ansible technology, including VMware, Linux, and Windows Systems Administrators, DevOps professionals, thought leaders, Infrastructure-as-Code enthusiasts, and information technology team members providing leadership to a business, this book is for you.
This book can be a powerful resource for computer engineers and leaders who believe that innovation, automation, and acceleration are drivers for a successful business of tomorrow. Look back on your career path and think of at least three times a lack of infrastructure automation has been a challenge for your projects deadline. Remember the human errors that impacted your business continuity and then think of when effective infrastructure performance enabled your projects to succeed.
Consider the need for business and information technology departments and get curious about what that means for information technology and business stakeholders.
A successful infrastructure is a matter of gradual improvements and good habits that you can achieve by using more automation on your journey.
Learn how to become more productive and effective using the Ansible open source automation technology.
Engineers have great impact, power, and responsibility for the success of the business.
What Is In This Book?
This book provides in-depth content on the following topics:
The Ansible code language for beginners and experienced users via examples
Ansible installation on the most common operating systems
Troubleshooting of common errors
Information on the latest releases of Ansible and ansible-core packages
Ansible for VMware infrastructure code snippets and examples
Your Development Environment
This book does not require you to use a specific IDE. You need a simple base environment consisting of
A common editor: terminal (VIM, Emacs, Nano, Pico, etc.) or GUI (VS Code, Atom, Geany, etc.)
A workstation with Ansible or ansible-core packages
VMware vSphere ESX, VMware vSphere ESXi, or VMware vSphere vCenter Server (for VMware-specific code
Additional Online Resource
Luca Berton maintains a popular website on Ansible development at www.ansiblepilot.com .
Introduction
I wrote this book to share with you how to automate tasks in your VMware infrastructure with Ansible. Ansible is rapidly ramping-up automation technology. It has become popular nowadays as an open-source IT infrastructure automation tool . You may have heard of technologies such as Puppet, Chef, and Terraform. What makes Ansible so successful is that it is free, portable, powerful, remarkably human readable, easy, and fun to use. Ansible has expanded to be very valuable in further use cases in production, acceptance, and testing (PAT) infrastructure design patterns under the categories of Provisioning, Configuration Management, Application Deployment, Continuous Deployment, Automation, and Orchestration. Especially in the post-pandemic world, we all live in an interconnected, fast-paced world driven by innovation and acceleration in technology. IT infrastructure is more than ever a key cornerstone in the innovation journey of every modern business corporation. A lot of enterprises already take advantage of the timesaving, error-avoiding, and auto-healing infrastructures permitted by modern IT automated infrastructure. In example after example I will show you the best way to simplify your VMware journey and get the best value from your Ansible code. Every IT department nowadays manages some resources on bare metal servers, virtual machines, the cloud, containers, and edge computing. And the demand is growing more and more year-over-year. In this book, you are going to learn how to enable Ansible to interact with your VMware infrastructures such as data centers, clusters, host systems, datastores, and virtual machines. For example, you can automate the creating, deleting, updating, and gathering of information for virtual machines. Say goodbye to mundane and annoying manual activity and focus your effort on how to scale your infrastructure and enable your business for the challenges of tomorrow!
For all of you who are security paranoid, Ansible provides out-of-the-box support protection for sensitive data. For example, you store credentials and tokens in an Ansible Vault using at least the AES-256 security cipher.
Are you ready to automate your day with Ansible?
Some interesting resources to explore for a deep dive into the Ansible product:
Official Ansible d ocumentation , https://docs.ansible.com/
Wikipedia Ansible page , https://en.wikipedia.org/wiki/Ansible_(software)
Who Is This Book For?
This book is designed for IT professionals in the information technology industry who would like a jargon-free understanding of Ansible technology for automating a VMware infrastructure .
This book offers systems administrators, developers, DevOps, decision makers, and thought leaders a guideline about implementing Infrastructure-as-Code in your VMware infrastructure.