Beginning Ansible concepts and application provisioning, configuring, and managing servers, applications, and their dependencies
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. Youll also think about security, why test...
Otros Autores: | , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
[Place of publication not identified] :
Apress
[2022]
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009661634106719 |
Tabla de Contenidos:
- Intro
- Table of Contents
- About the Authors
- About the Technical Reviewer
- Introduction
- What Is Ansible?
- But Why Ansible?
- Sounds Great - What Do We Cover?
- Chapter 1: Getting Setup and Running
- Chapter 2: Your First Steps with Ansible
- Chapter 3: Choosing Your Targets
- Chapter 4: Your First Playbook
- Chapter 5: Batteries Included: Ansible Modules
- Chapter 6: It's All Variable, That's a Fact!
- Chapter 7: Becoming an Ansible Jinja
- Chapter 8: Handling Change
- Chapter 9: Roles: Ansible's Packing Cubes
- Chapter 10: Building a Load Balancer: Controlling Flow
- Chapter 11: Running a Blog
- Chapter 12: Locking Away Your Secrets: Vaults
- Chapter 13: Worlds of Possibility
- Summary
- Chapter 1: Getting Setup and Running
- What We Will Cover
- What You'll Be Using
- An Internet Connection
- Virtual Machine Manager: VirtualBox
- Vagrant
- Ansible
- Getting Setup
- Downloading VirtualBox
- Windows and Mac
- Linux
- Installing Vagrant
- Windows and Mac
- Linux
- Setting Up Ansible
- Troubleshooting VirtualBox Errors
- Using the Vagrant Environment
- Status
- Logging In
- Suspending the Virtual Environment
- Using Your Own Environment
- Chapter 2: Your First Steps with Ansible
- Climbing into the Driving Seat
- Declare Your Intent
- It Uses SSH
- Harnessing This Power
- What Changed?
- Start Your Engines
- Familiarize with the Controls
- More Than Ping: Our Hello World
- Get Moving: Making a Change
- Getting Help with Modules
- Working with Others: A Simple Inventory
- Unleash the Power in Parallel
- Plugging in the GPS
- Summary
- Chapter 3: Choosing Your Targets
- Exploring Our Simple Inventory
- A More Complex Structure
- Combining Hosts and Groups
- Regular Expressions and Host Ranges
- Including and Excluding Hosts
- Group the World: Groups of Groups.
- Setting Variables on the Group
- Structuring Your Inventory for Success
- Directory-Based Inventory
- YAML Format Inventory
- Summary
- Chapter 4: Your First Playbook
- Modules and Tasks
- Structuring Your Tasks: Playbooks
- Building Up Your Playbook
- Execute the Playbook
- Becoming the All-Powerful Root User
- Check the Results
- Pushing Files
- Execute the Playbook
- A Note on Idempotence
- Syntax Checking Your Playbooks
- Summary
- Chapter 5: Batteries Included: Ansible Modules
- Where Do Modules Come From?
- Exploring the apt Module
- Updating the apt Cache
- Upgrading Packages
- Upgrading All Packages
- Learning Modules
- Exploring More Modules
- Summary
- Optional Excercise: Exploring "apt latest" Idempotence
- Chapter 6: It's All Variable, That's a Fact!
- Defining Variables and Precedence
- Changing the HTTP Port
- Testing Your Change
- The Firewall
- Variable Naming
- Magic Variables
- It's a Fact!
- Using Facts
- Disabling Fact Gathering
- Register Your Success
- Summary
- Variable Precedence Hierarchy
- Chapter 7: Becoming an Ansible Jinja
- Variables and Jinja2
- Filters
- The default() Filter
- Templating
- Templating index.html
- Templating Configuration Files
- Controlling Flow
- Conditionals
- Loops
- Whitespace
- Summary
- Chapter 8: Handling Change
- What Is a Handler?
- Writing Your Handler
- Handlers Run Only Once
- Handlers Run at the End, Usually
- Grouping Handlers with listen
- Exercise: Modify Your Upgrade Playbook to Only Reboot When a Reboot Is Required
- Chapter 9: Roles: Ansible's Packing Cubes
- What's in a Role?
- Walk-Through: Web Server Installation
- Moving Tasks
- Migrate the Handler
- Migrate Templates
- Use the New Roles in Your Playbook
- Validate Your Structure
- Role Structure
- Role Default Variables
- Role Dependencies.
- Includes: Dynamic vs. Static
- Old-Style Roles
- Summary
- Chapter 10: Building a Load Balancer: Controlling Flow
- Introducing the Load Balancer
- Installing the Load Balancer
- Create a New Handler for HAProxy
- Add a Simple Frontend Configuration
- Add the Firewall Dependency
- Bringing It Together
- Build the Load Balancer
- Verify That It Worked
- Setting Up Backends: Looping in Config Templates
- Create Backends
- Wire the Frontend to the Backend
- Execute the Playbook
- Bringing It Together
- Build a single Provision Playbook
- Execute the Provision Playbook
- Playing Tag
- Add a Firewall Tag
- Executing Only Firewall Tasks
- Skipping Firewall Tasks
- Firewall Rules Using Loops
- Add an https_port
- Execute Firewall Tasks
- Summary
- Chapter 11: Running a Blog
- A Note About Credentials
- PHP on the Webservers
- Set Up a Database Server
- Exercise: Build a Database Role
- Add Database Configuration
- Extend the New Database Role
- The mysql_* Modules
- Load Balancer Backend Persistence
- Install WordPress
- Create the WordPress Role
- Create a wp-config.php.j2 Template
- Add Role to the Webservers Play
- Complete Installation
- Wrapping Up
- Summary
- Chapter 12: Locking Away Your Secrets: Vaults
- Diving into Vaults
- Creating Your First Vault
- Vault IDs
- Encrypting Secrets
- Configuration Files
- Encrypting Your Credentials
- Rerun the Playbook
- Add SSL to Our Load Balancer
- Summary
- Chapter 13: Worlds of Possibility
- Using the Documentation
- Website Community Documentation
- The ansible-doc Tool
- Ansible Galaxy
- Useful Collections
- Getting Help
- Documentation
- Mailing Lists
- Non-Ansible Resources
- Summary
- Index.