Ansible pdf books download - sounds
About the Book
Ansible for DevOps
Ansible for DevOps
Server and configuration management for humans
This book is 100% complete
Completed on 2020-08-05
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Ansible is a simple, but powerful, server and configuration management tool (with a few other tricks up its sleeve). This book helps those familiar with the command line and basic shell scripting start using Ansible to provision and manage anywhere from one to thousands of servers.
The book begins with fundamentals, like installing Ansible, setting up a basic inventory file, and basic concepts, then guides you through Ansible's many uses, including ad-hoc commands, basic and advanced playbooks, application deployments, multiple-provider server provisioning, and even Docker orchestration! Everything is explained with pertinent real-world examples, often using Vagrant-managed virtual machines.
Examples in the book are tested with the latest version of Ansible (2.x as of this writing).
About the Author
Jeff Geerling is a developer who has worked in programming and devops for companies with anywhere between one to thousands of servers. He also manages many virtual servers for services offered by Midwestern Mac, LLC, and has been using Ansible to manage infrastructure since early 2013.
Table of Contents
- Foreword
- Preface
- Second Edition
- Who is this book for?
- Typographic conventions
- Please help improve this book!
- Current Published Book Version Information
- About the Author
- Introduction
- In the beginning, there were sysadmins
- Modern infrastructure management
- Ansible and Red Hat
- Ansible Examples
- Other resources
- Chapter 1 - Getting Started with Ansible
- Ansible and Infrastructure Management
- On snowflakes and shell scripts
- Configuration management
- Installing Ansible
- Creating a basic inventory file
- Running your first Ad-Hoc Ansible command
- Summary
- Ansible and Infrastructure Management
- Chapter 2 - Local Infrastructure Development: Ansible and Vagrant
- Prototyping and testing with local virtual machines
- Your first local server: Setting up Vagrant
- Using Ansible with Vagrant
- Your first Ansible playbook
- Cleaning Up
- Summary
- Chapter 3 - Ad-Hoc Commands
- Conducting an orchestra
- Build infrastructure with Vagrant for testing
- Inventory file for multiple servers
- Your first ad-hoc commands
- Discover Ansible’s parallel nature
- Learning about your environment
- Make changes using Ansible modules
- Configure groups of servers, or individual servers
- Configure the Application servers
- Configure the Database servers
- Make changes to just one server
- Manage users and groups
- Manage packages
- Manage files and directories
- Get information about a file
- Copy a file to the servers
- Retrieve a file from the servers
- Create directories and files
- Delete directories and files
- Run operations in the background
- Update servers asynchronously with asynchronous jobs
- Check log files
- Manage cron jobs
- Deploy a version-controlled application
- Ansible’s SSH connection history
- Paramiko
- OpenSSH (default)
- Faster OpenSSH with Pipelining
- Summary
- Chapter 4 - Ansible Playbooks
- Power plays
- Running Playbooks with
- Limiting playbooks to particular hosts and groups
- Setting user and sudo options with
- Other options for
- Real-world playbook: CentOS Node.js app server
- Add extra repositories
- Deploy a Node.js app
- Launch a Node.js app
- Node.js app server summary
- Real-world playbook: Ubuntu LAMP server with Drupal
- Include a variables file, and discover and
- Basic LAMP server setup
- Configure Apache
- Configure PHP with
- Configure MySQL
- Install Composer
- Create a Drupal project with Composer
- Install Drupal with Drush
- Drupal LAMP server summary
- Real-world playbook: Ubuntu server with Solr
- Include a variables file, and more
- Install Java
- Install Apache Solr
- Apache Solr server summary
- Summary
- Chapter 5 - Ansible Playbooks - Beyond the Basics
- Handlers
- Environment variables
- Per-task environment variables
- Variables
- Playbook Variables
- Inventory variables
- Registered Variables
- Accessing Variables
- Host and Group variables
- Automatically-loaded and
- Magic variables with host and group variables and information
- Facts (Variables derived from system information)
- Ansible Vault - Keeping secrets secret
- Variable Precedence
- If/then/when - Conditionals
- Jinja Expressions, Python built-ins, and Logic
- and
- Delegation, Local Actions, and Pauses
- Pausing playbook execution with
- Running an entire playbook locally
- Prompts
- Tags
- Blocks
- Summary
- Chapter 6 - Playbook Organization - Roles, Includes, and Imports
- Imports
- Includes
- Dynamic includes
- Handler imports and includes
- Playbook imports
- Complete includes example
- Roles
- Role scaffolding
- Building your first role
- More flexibility with role vars and defaults
- Other role parts: handlers, files, and templates
- Handlers
- Files and Templates
- Organizing more complex and cross-platform roles
- Ansible Galaxy
- Getting roles from Galaxy
- Using role requirements files to manage dependencies
- A LAMP server in nine lines of YAML
- A Solr server in seven lines of YAML
- Helpful Galaxy commands
- Contributing to Ansible Galaxy
- Getting roles from Galaxy
- Summary
- Imports
- Chapter 7 - Ansible Plugins and Content Collections
- Creating our first Ansible Plugin — A Jinja Filter
- The history of Ansible Content Collections
- The Anatomy of a Collection
- Putting our Plugin into a Collection
- Going deeper developing collections
- Collections on Automation Hub and Ansible Galaxy
- Collection version constraints
- Where are collections installed?
- Summary
- Chapter 8 - Inventories
- A real-world web application server inventory
- Non-prod environments, separate inventory files
- Inventory variables
- Ephemeral infrastructure: Dynamic inventory
- Dynamic inventory with DigitalOcean
- DigitalOcean account prerequisites
- Connecting to your DigitalOcean account
- Creating a droplet with Ansible
- DigitalOcean dynamic inventory with
- Dynamic inventory with AWS
- Inventory on-the-fly: and
- Multiple inventory sources - mixing static and dynamic inventories
- Creating custom dynamic inventories
- Building a Custom Dynamic Inventory in Python
- Building a Custom Dynamic Inventory in PHP
- Managing a PaaS with a Custom Dynamic Inventory
- Dynamic inventory with DigitalOcean
- Summary
- A real-world web application server inventory
- Chapter 9 - Ansible Cookbooks
- Highly-Available Infrastructure with Ansible
- Directory Structure
- Individual Server Playbooks
- Main Playbook for Configuring All Servers
- Getting the required roles
- Vagrantfile for Local Infrastructure via VirtualBox
- Provisioner Configuration: DigitalOcean
- Provisioner Configuration: Amazon Web Services (EC2)
- AWS EC2 Dynamic inventory plugin
- Summary
- ELK Logging with Ansible
- ELK Playbook
- Forwarding Logs from Other Servers
- Summary
- GlusterFS Distributed File System Configuration with Ansible
- Configuring Gluster - Basic Overview
- Configuring Gluster with Ansible
- Summary
- Mac Provisioning with Ansible and Homebrew
- Running Ansible playbooks locally
- Automating Homebrew package and app management
- Configuring Mac OS X through dotfiles
- Summary
- Highly-Available Infrastructure with Ansible
- Chapter 10 - Deployments with Ansible
- Deployment strategies
- Simple single-server deployments
- Provisioning a Ruby on Rails server
- Deploying a Rails app to the server
- Provisioning and Deploying the Rails App
- Deploying application updates
- Zero-downtime multi-server deployments
- Ensuring zero downtime with and integration tests
- Deploying to app servers behind a load balancer
- Capistrano-style and blue-green deployments
- Additional Deployment Features
- Summary
- Chapter 11 - Server Security and Ansible
- A brief history of SSH and remote access
- Telnet
- rlogin, rsh and rcp
- SSH
- The evolution of SSH and the future of remote access
- Use secure and encrypted communication
- Disable root login and use
- Remove unused software, open only required ports
- Use the principle of least privilege
- User account configuration
- File permissions
- Update the OS and installed software
- Automating updates
- Automating updates for RHEL systems
- Automating updates for Debian-based systems
- Use a properly-configured firewall
- Configuring a firewall with on Debian or Ubuntu
- Configuring a firewall with on RHEL, Fedora, or CentOS
- Make sure log files are populated and rotated
- Monitor logins and block suspect IP addresses
- Use SELinux (Security-Enhanced Linux) or AppArmor
- Summary and further reading
- A brief history of SSH and remote access
- Chapter 12 - Automating Your Automation with Ansible Tower and CI/CD
-
- Installing Ansible AWX
- Using AWX
- Uninstalling AWX
- Other Tower Features of Note
- Tower Alternatives
- Jenkins CI
- Build a local Jenkins server with Ansible
- Create an Ansible playbook on the Jenkins server
- Create a Jenkins job to run an Ansible Playbook
- Summary
-
- Chapter 13 - Testing and CI for Ansible Content
- Unit, Integration, and Functional Testing
- Debugging and Asserting
- The and modules
- Linting YAML with
- Performing a
- Linting Ansible content with
- Automated testing and development with Molecule
- Testing a role with Molecule
- Testing a playbook with Molecule
- Adjusting Molecule to use more flexible test containers
- Verifying a playbook with Molecule
- Adding lint configuration to Molecule
- Molecule Summary
- Running your playbook in check mode
- Automated testing on GitHub using GitHub Actions
- Automated testing in other CI environments
- Real-world examples
- Functional testing using serverspec or testinfra
- Summary
- Chapter 14 - Automating HTTPS and TLS Certificates
- Generating Self-Signed Certificates with Ansible
- Idempotent Nginx HTTPS playbook with a self-signed cert
- Automating Let’s Encrypt with Ansible for free Certs
- Use Galaxy roles to get things done faster
- Create the playbook
- Create a server and configure DNS
- Point the playbook inventory at the server
- Access your server over HTTPS!
- Configuring Nginx to proxy HTTP traffic and serve it over HTTPS
- Modify the Nginx configuration to proxy traffic
- Summary
- Generating Self-Signed Certificates with Ansible
- Chapter 15 - Docker and Ansible
- A brief introduction to Docker containers
- Using Ansible to build and manage containers
- Building a Flask app with Ansible and Docker
- Data storage container
- Flask container
- MySQL container
- Ship it!
- Building containers with Ansible from the outside
- Build a Hubot Slack bot container with
- Hubot and Slack
- Building a Docker container with Ansible
- Building the role
- Building and running the Hubot Slack bot container
- Summary
- Build a Hubot Slack bot container with
- Summary
- Afterword
- Appendix A - Using Ansible on Windows workstations
- Method 1 - Use the Windows Subsystem for Linux
- Installing Ansible inside WSL
- Method 2 - When WSL is not an option
- Prerequisites
- Set up an Ubuntu Linux Virtual Machine
- Log into the Virtual Machine
- Install Ansible
- Summary
- Method 1 - Use the Windows Subsystem for Linux
- Appendix B - Ansible Best Practices and Conventions
- Playbook Organization
- Write comments and use liberally
- Include related variables and tasks
- Use Roles to bundle logical groupings of configuration
- Use role defaults and vars correctly
- YAML Conventions and Best Practices
- YAML for Ansible tasks
- Three ways to format Ansible tasks
- Shorthand/one-line ()
- Structured map/multi-line ()
- Folded scalars/multi-line ()
- Using to format multiline variables
- Using
- Use Ansible Tower
- Install Galaxy dependencies local to your playbook
- Discriminate wisely when choosing community dependencies
- Specify for playbooks running on > 5 servers
- Use Ansible’s Configuration file
- Summary
- Playbook Organization
- Notes
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.
Learn more about writing on Leanpub
Top Books
- #1
El Manual del Manager
Keyvan Akbary, Félix López, and Álvaro Salazar¿Has deseado alguna vez el haber tenido una buena introducción al rol del Engineering Manager? En este libro aprenderás lo necesario para ejercer el rol de una manera efectiva: Expectativas y Responsabilidades del Rol, 1-1s, Ayudar a Crecer, Objetivos, Planes de Carrera, Cultura, Feedback, Contratación, Cultura de Producto y mucho más.
- #2
Ansible for Kubernetes
Ansible is a powerful infrastructure automation tool. Kubernetes is a powerful application deployment platform. Learn how to use these tools to automate massively-scalable, highly-available infrastructure.
- #3
Functional Design and Architecture
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
- #4
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
The service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
- #5
CCIE SP v4.1 - Workbook
Łukasz Bromirski, Piotr Jablonski, and Nicholas RussoAre you striving to prepare to and pass CCIE SP lab exam? Take the opportunity and get this workbook! With the attached initial cfg files you will prepare yourself for the CCIE SP exam as well as learn SP technologies applicable to all kinds of today modern networks! This workbook covers blueprint topics and provides challenging examples.
- #6
Ansible for DevOps
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
- #7
Code Faster in Delphi
This book will make you a faster Delphi developer, it doesn't matter if you are just starting out, or have been using Delphi since version 1, you will find all sorts of tips, tricks and hacks to boost your productivity.
- #8
R Programming for Data Science
This book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
- #9
Practical FP in Scala: A hands-on approach
A practical book aimed for those familiar with functional programming in Scala who are yet not confident about architecting an application from scratch.
Together, we will develop a purely functional application using the best libraries in the Cats ecosystem, while learning about design patterns and best practices.
- #10
Cloud Strategy
“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Top Bundles
- #1
Quality Software
11 Books
The Quality Software Bundle is for managers, would-be managers, and any of us who find themselves being managed and confused. This comprehensive bundle covers the entire span of software development approaches, from hacking through waterfall, cascade, prototyping, Iterative enhancement, reusable code, off-the-shelf, to Agile teams. The bundle... - #2
agile
11 Books
In this bundle, you will find 10 different agile books. They are about different aspects of being agile. - finding a job - doing coding dojo's - Retrospectives - Personal kanban - a non-typical coaching book and even a book that gives you an insight in the lives of some agile people. - #3
WTFlop 6M + HU - Beta Bundle
6 Books
- #4
Node Patterns
6 Books
- #5
Fifty Quick Ideas
3 Books
Get all three books for the price of two! Fifty Quick Ideas books are full of practical, real-world techniques that you can use to improve teamwork, build better products and build them in a better way. - #6
Growing Agile: Coach's Guide Series
4 Books
This bundle provides a collection of training and workshop plans for a variety of agile topics. The series is aimed at agile coaches, trainers and ScrumMasters who often find themselves needing to help teams understand agile concepts. Each book in the series provides the plans, slides, handouts and activity instructions to run a number of... - #7
Marionette.js A to Z
3 Books
Marionette.js has become a popular Backbone-based javascript library, because it helps you avoid boiler-plate code and focus on what makes your app special. But how do you get started?Whether you want to finally get started with dynamic client-side programming (like one reader did), or are an experienced front-end dev who has inherited a... - #8
Complete Scala Bundle
3 Books
Scala is a general-purpose programming language and it's getting extremely popular these days. Some say that learning Scala could be a challenging task. My experience, however, suggests that this is actually a myth that has very little to do with reality. With the right approach, learning Scala can be easy, fun and rewarding.The first book from... - #9
Build A Better Backbone App
3 Books
The best way to learn new development skills is through experience, but that takes time you don't have.Get the best of both worlds with this bundle: you'll learn how to produce modern web applications by learning from experienced developers like Derick Bailey and David Sulc. BackboneJS is one of the favorite tools on the web today, but it... - #10
People Skills—Soft but Difficult
7 Books
Perhaps you've been told that "lack of people skills" has been holding you back. No wonder: you may have had hundreds of hours of technical training, but little or no "people skills" guidance.You've heard it said that people skills are "soft," whereas technical skills are "hard." For you, though, technical skills are "easy," but people skills...
-
-