Ansible Quick Start Guide
Control and monitor infrastructures of any size,
physical or virtual
Mohamed Alibi
BIRMINGHAM - MUMBAI
Ansible Quick Start Guide
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Gebin George
Acquisition Editor: Reshma Raman
Content Development Editor: Mohammed Yusuf Imaratwale
Technical Editor: Sushmeeta Jena
Copy Editor: Safis Editing
Project Coordinator: Hardik Bhinde
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Graphics: Alishon Mendonsa
Production Coordinator: Deepika Naik
First published: September 2018
Production reference: 1270918
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78953-293-7
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Mohamed Alibi is a Linux system administrator who works at the European Bioinformatics Institute, EMBL-EBI. His area of specialization is mass virtual machine and container provisioning and infrastructure administration for medium-sized distributed bioinformatics training facilities. He always keeps abreast of the latest innovations and developments in new technologies to solve his daily challenges. He holds an MSc in Networking and Computer Sciences in a collaborative program with the University of Illinois Urbana-Champaign and the IPT of Tunis, where he expanded his expertise in grid computing data management between the NCSA and IGB under the NIH project H3ABioNet. He published his first book in 2015 with Packt, called Mastering CentOS 7 Linux Server.
I want to thank my wife, Sabrine, and daughter, Bayah Khadija, for their motivation throughout this journey. I want to thank my friends for supporting me with encouragement and guiding wisdom. I also want to express my deepest gratitude to my colleagues and supervisors for their guidance and continuous support that helped me to achieve my goals. Finally, my deep and sincere gratitude to my family for their continuous and unparalleled love, help, and support.
About the reviewer
Anis Regaieg is an IT infrastructure and cloud computing engineer currently working as a system administrator at the Tunisian Electoral Management Body. With more than five years of experience in Linux system administration, virtualization, and cloud computing, his main expertise is in high availability and performance optimization solutions. Anis is also passionate about new technologies and software programming.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
This is an Ansible guidebook for beginner systems administrators. It aims to properly introduce Ansible as an automation and configuration management tool. Readers of the book should, by the end, master basic use of Ansible playbooks and modules by learning from real-life sample codes that demonstrate each module's functionality to help achieve infrastructure and task automation and orchestration. The book contains some extra advanced tips for those who want to go the extra mile and learn about and collaborate with the Ansible community.
Who this book is for
This book is for three major audiences. First, systems administrators who work with either Linux, Windows, or Mac OS X. This covers those who work on bare-metal machines, virtual infrastructure, or cloud-based environments. Then, network administrators, those who work on distributed proprietary network equipment. Finally, DevOps. This book offers a good understanding of how the system they are going to deploy their application in will behave, enabling them to code accordingly or suggest modifications that can benefit their applications.
What this book covers
, What is Ansible? , is an introduction to Ansible and compares it with other configuration management tools.
, Ansible Setup and Configuration , explains how to set up and configure Ansible on multiple systems.
, Ansible Inventory and Playbook , is an introduction to and overview of Ansible Inventory and Playbook.
, Ansible Modules , covers Ansible's most often used modules with real-life sample usage code.
, Ansible Automated Infrastructure , enumerates Ansible's use cases for multiple infrastructures.
, Ansible Coding for Configuration Management , contains best practices for coding Ansible playbooks.
Next page