Learn the concepts and develop the skills to be a true Ansible artist and use it inside and outside the box. This book applies key concepts immediately while building up your Ansible skills layer by layer through easy to grasp examples and engaging projects. You'll also think about security, why testing is important, and how to use version control safely.

As a beginner to Ansible, you'll be guided step-by-step through creating your first Ansible playbook to deploying your first server and writing more complex cross-dependency playbooks. From the first line of code to the last, you'll constantly iterate and simplify your playbooks, iwhile taking on more complex topics as you construct a full Wordpress website stack consisting of a database, web servers, and load balancer. This book will prompt you to think about how these fit together and will explain what to do to ensure maintainability long into the future.

Don't just use Ansible. Completely change how you go about provisioning, configuring, and managing servers, applications, and their dependencies with this powerful, open source automation tool. In exchange for this power and efficiency, Ansible demands a very different way of thinking about resources and how they all fit together. This can be hard to get your head around if you've never done it before. Every step of the way, Beginning Ansible Concepts and Application show you best practices so that you can confidently start using Ansible right away.

What You'll Learn

  • Set up an Ansible environment
  • Create and run playbooks
  • Organize groups of variables, vaults, roles, and tasks to ensure your playbooks are scalable
  • Protect secrets using Ansible Vaults
  • Automate the build of a Wordpress website

Who This Book Is For

Developers looking for a better way to manage their servers other than by logging in and typing commands. Also enthusiasts who want to learn not just how to use Ansible but how to use it correctly and confidently.




Shaun Smith is a Fellow of the British Computer Society (BCS) and holds degrees in Computer Science and Psychology. He has a wealth of experience across a broad range of technology, which he combines in novel ways to build out industry-leading, scalable and highly-secure solutions to complex problems. He evangelises simple, elegant and secure designs and these days is focusing on making the Internet a safer place to be and up-skilling the next generation.
Peter Membrey is a Chartered Fellow of the British Computer Society, a Chartered IT Professional and a Chartered Engineer with nearly a quarter of a century in the field. He has a doctorate in engineering and a masters degree in IT specialising in Information Security. He's co-authored over a dozen books, a number of research papers on a variety of topics and has recently been awarded the Distinguished Contributor award by the IEEE Computer Society.

Autorentext

Peter Membrey is a Chartered Fellow of the British Computer Society, a Chartered IT Professional and a Chartered Engineer who holds a Master's degree in IT specializing in Information Security. He holds a current RHCE and had the honor of working for and with Red Hat for many years. He is currently studying for an Engineering Doctorate at the Hong Kong Polytechnic University with an interest in precision time keeping and synchronization in IoT devices. He lives in Hong Kong with his wife Sarah and sons Kaydyn and Xandyr. He still can't speak Chinese.

Shaun Smith holds a First-class dual honors degree in Computer Science and Psychology, and has spent the past 2 decades building out large-scale, secure infrastructure in all corners of the world. Having dabbled in everything from his humble beginnings as a Linux Systems Administrator, to building out state-of-the-art data centres, high-density WiFi installations, security solutions for large government contracts, and designing cross-border solutions for numerous large businesses entering the Chinese market. Shaun has become an evangelist for well-tested, maintainable code-bases and aims to automate himself out of any job he enters. He has settled on Hong Kong as his long-term home, where he now lives with his wife and two beautiful children.



Inhalt

Chapter 1 - Setting the Scene

Foundations of Ansibl

Create an environment

Challenges to come

Chapter 2 - Say Hello to Ansible

Introduce Ansible

History

Tools

Chapter 3 - Getting Ansible and Setting Up the Environment

Download and set up Ansible

Using virtual python environments

Using VirtualBox

Chapter 4 - Your First Steps with Ansible

Play with Ansible

Revision control and security aspects

Python 2 vs 3

Chapter 5 - Run Your First playbook

Create and run your first playbook

Structure of a playbook

Put servers under source control

Chapter 6 - Designing an Inventory

Using localhost

Inventories

Chapter 7 - Setting Your Sights - Target the Servers You Want

Setting up real servers

Playbook skills and inventory skills

Writing the playbook

Chapter 8 - Batteries Included - The Core Modules

Core modules

Installing packages, copying config files, and making changes to system config

Web based documentation

Chapter 9 - Gathering Data and the Power of Facts

Using fact gathering

Automatic (implicit) fact-gathering for every playbook

Explicit fact gathering

Stat to gain information on files, directories, and symbolic links

Chapter 10 - The Building Blocks of Ansible - Roles

Chapter 11 - Making Decisions and Controlling Flow

Conditionals

Options

includes and when clauses

Chapter 12 - Repeating Yourself

Loops

Syntax

Chapter 13 - Jinja 2 and the Power of Templates

Chapter 14 - Structuring Your Repo for Success

Basic directory structure

Organize groups of variables, vaults, roles, and tasks to ensure your playbooks are scalable

Chapter 15 - Locking Away Your Secrets

Ansible-vaults

Environment specific encrypted stores

Chapter 16 - Extending the Power of Ansible

Creation of custom modules

Module types (actions, filters, callback to name a few)

Hints and tips on when a plugin is the right course of action

Chapter 17 - Dynamically Generating Your Inventory

Inventory, or CMDB

Inventory source

Simple web service to pull in the ansible inventory at runtime

Meta groups

Chapter 18 - Community

Share playbooks with like-minded sysadmins

Ansible Galaxy

Chapter 19 - Troubleshooting Ansible

Chapter 20 - Other Projects Around AnsiblePOSSIBLE: document interesting projects that make use of Ansible's power, such as ansible-cmdb

Titel
Beginning Ansible Concepts and Application
Untertitel
Provisioning, Configuring, and Managing Servers, Applications, and Their Dependencies
EAN
9781484281734
Format
E-Book (pdf)
Hersteller
Herausgeber
Veröffentlichung
28.04.2022
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
3.24 MB
Anzahl Seiten
283
Features
Unterstützte Lesegerätegruppen: PC/MAC/eReader/Tablet