The Ansible Workshop Hands-On Learning for Rapid Mastery

"The Ansible Workshop" offers a comprehensive journey through the world of Ansible, guiding readers from foundational concepts to advanced applications in automation. Readers delve into creating and managing inventories, an essential aspect of organizing systems for automation. As the jour...

Full description

Bibliographic Details
Other Authors: El Amri, Aymen, author (author)
Format: eBook
Language:Inglés
Published: Paris, France : FAUN [2024]
Edition:First edition
Subjects:
See on Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009820528806719
Table of Contents:
  • Intro
  • Preface
  • What Are You Going To Learn?
  • Who Is This Guide For?
  • About The Author
  • The Companion Toolkit
  • Join the Community
  • Your Feedback Matters
  • Overview of Ansible
  • What is Ansible?
  • The Tale of Ansible
  • Declarative vs. Imperative Automation
  • Ansible Architecture
  • Inventory
  • Playbooks
  • Modules
  • Plugins
  • Roles
  • Ansible Vault
  • Ansible Engine
  • How Does Ansible Work?
  • Pros of Ansible
  • Cons of Ansible
  • Ansible vs Other Tools
  • Chef vs Ansible
  • Puppet vs Ansible
  • SaltStack vs Ansible
  • Introduction to Ansible
  • Prerequisites
  • Installing and Configuring Ansible
  • Ansible Inventory
  • Understanding the Ansible Inventory
  • Creating Advanced Ansible Inventories
  • Advanced Techniques To Target Specific Managed Nodes
  • Using the Default Inventory
  • Dynamic Inventories
  • Creating and Using Playbooks
  • Ad-hoc Commands vs Playbooks
  • Creating a Playbook
  • Playbook, Play, and Tasks
  • Creating Advanced Playbooks - Part 1
  • Creating Advanced Playbooks - Part 2
  • Ansible Facts
  • What are Ansible Facts and Why Do We Need Them?
  • Finding Ansible Facts
  • How To Use Ansible Facts
  • Advanced Usage of Ansible Facts
  • Debugging Ansible
  • Enabling Debugging
  • Debugging Tasks
  • Identify The Task That Failed
  • List The Task Variables
  • Identify The Host Where The Task Has Failed
  • Print The Execution Result of The Task
  • List All Task Arguments
  • Getting a Single Task Argument
  • Using the Debugger to Fix the Error
  • Enabling Debugging for All Tasks
  • Choosing When to Debug
  • Low-Level Debugging
  • Dry Run: Testing Playbooks Without Executing Them
  • Callback Plugins
  • Printing Variables
  • Printing The Output Of A Command
  • Printing The Output Of A Task
  • Using Your IDE to Write Better Playbooks
  • Ansible Vault and Sensitive Data Management
  • What is Ansible Vault?.
  • How to Use Ansible Vault
  • Using Password Files
  • Using Vault IDs
  • Ansible Blocks
  • What are Ansible Blocks?
  • How to Use Ansible Blocks
  • Error Handling with Ansible Blocks
  • Using "Rescue" and "Always" Together
  • Ansible Blocks with Asynchronous Tasks
  • Ansible Modules, Plugins, and Filters
  • What is an Ansible Module?
  • What is an Ansible Plugin?
  • Modules vs Plugins
  • Installing Ansible Modules and Plugins
  • Exploring the Lookup Plugins
  • Creating Ansible Modules
  • Documenting Your Module
  • Using The AnsibleModule Utility Class
  • A Full Example
  • Imports And Metadata
  • Function run_module()
  • Function main()
  • Execution Check
  • Developing an Ansible Module That Uses Generative AI
  • What Is An Ansible Filter?
  • Using Ansible Filters
  • Creating Ansible Filters
  • Ansible Roles
  • Role Directory Structure
  • Using "Defaults": Default Variables
  • Using "Files": Static Files
  • Using "Handlers": Actions Triggered by Tasks
  • Using "Meta"
  • Using "Tasks": Main List of Tasks
  • Using "Templates": Template Files
  • Using "Tests": Testing the Role
  • Using "Vars": Variables for the Role
  • Creating a Role
  • Making Ansible Faster
  • Disabling SSH Host Key Checking
  • Disabling Fact Gathering
  • Using More Forks
  • Optimize How Ansible Uses SSH
  • Use Asynchronous Tasks
  • Sequential vs Batch Mode
  • Using Execution Strategies
  • Managing Docker and Docker Compose with Ansible
  • Installation and Prerequisites
  • Building Docker Images from Ansible Playbooks
  • Tagging and Pushing Docker Images
  • Managing Docker Containers from Ansible Playbooks
  • Managing Docker Networks from Ansible Playbooks
  • Managing Docker Volumes from Ansible Playbooks
  • Docker Compose Up and Running with Ansible
  • Automating Kubernetes with Ansible
  • What is a Highly Available Kubernetes Cluster?
  • Etcd Nodes
  • Control Plane Nodes.
  • Worker Nodes
  • Creating a Highly Available Kubernetes Cluster with Kubespray and Ansible
  • Available Options to Deploy Kubernetes
  • Prerequisites and Initial Setup
  • Creating The Inventory
  • Creating the Cluster
  • How Kubespray Works
  • Step 1: Pre-Configuration Checks and Setup
  • Step 2: Setting Up Container Runtime
  • Step 3: Network Plugin Installation
  • Step 4: Kubernetes Components Installation
  • Step 5: Initialization of the First Control Plane Node
  • Step 6: Setting Up etcd Cluster
  • Step 7: Joining Additional Control Plane Nodes
  • Step 8: Joining Worker Nodes
  • Step 9: Cluster Configuration With Addons
  • Step 10: Cluster Verification And Health Checks
  • Step 11: Security Configuration
  • Step 12: Applying Custom Configurations
  • Step 13: Cluster Ready For Deployment
  • Start Using The Cluster
  • Deploying to Kubernetes with Ansible
  • Deploying to Kubernetes with Ansible and the K8s Module
  • Using Remote Manifests
  • Inline Manifests
  • Validating Kubernetes Definitions
  • Managing Multiple Clusters
  • Patching Resources
  • Restarting Deployments
  • Deploying to Kubernetes with Ansible and Helm
  • Templating Kubernetes Resources With Ansible
  • Troubleshooting Kubernetes with Ansible
  • Creating Generic Debug Tasks to View Kubernetes Resources
  • Viewing Kubernetes Pod Logs with Ansible
  • Ansible + Kubernetes = A Powerful Combination
  • Ansible Cheat Sheet
  • Installing Ansible
  • On Linux
  • On macOS
  • On Windows
  • Configuring Ansible
  • Inventory
  • Setting Up the Inventory File (INI)
  • Setting Up the Inventory File (YAML)
  • Ansible Host Variables
  • Testing Your Setup
  • Playbook Structure
  • Playbook Keywords
  • Common Modules
  • Running a Command
  • Running a Shell Command
  • Running a Raw Command
  • Copying a File
  • Installing a Package
  • Restarting a Service
  • Copying a File with Permissions.
  • Copying a File with Permissions and Context
  • Playbooks
  • Running a Playbook
  • Running a Playbook with Inventory
  • Running a Playbook with Inventory and Limit
  • Running a Playbook with Limit
  • Running a Playbook with Tags
  • Running a Playbook with Skip Tags
  • Running a Playbook with Extra Variables
  • Running a Playbook with a Vault Password File
  • Running a Playbook with Ask Vault Password
  • Running a Playbook with Ask Sudo Password
  • Running a Playbook with Ask Pass
  • Running a Playbook in Check Mode
  • Running a Playbook in Diff Mode
  • Running a Playbook in Verbose Mode
  • Running a Playbook in Extra Verbose Mode
  • Running a Playbook in Extra Extra Verbose Mode
  • Running a Playbook in Extra Extra Extra Verbose Mode
  • Running a Playbook in Extra Extra Extra Extra Verbose Mode
  • Running a Playbook with Forks
  • Running a Playbook with Timeout
  • Jinja2
  • Using Jinja2
  • Using Jinja2 with Filters
  • Jinja2 Template
  • Jinja2 Template with Variables
  • Templates with Loops
  • Templates with Conditionals
  • Templates with Filters
  • Host Patterns
  • Debugging
  • Syntax Check a Playbook
  • Check if Hosts Are Reachable
  • Check if Hosts Are Reachable with SSH
  • Check if Hosts Are Reachable with WinRM
  • Check if Hosts Are Reachable Locally
  • Verbose Mode
  • Debug Mode
  • Capture Output
  • Capture Output and Show Only Specific Fields
  • Capture Output and Show Only Specific Fields with Jinja2
  • Gathering Facts
  • Gathering Facts for All Hosts
  • Gathering Facts for a Specific Host
  • Gathering Facts for a Specific Host and Saving to a File
  • Variables
  • Setting a Variable
  • Setting a Variable with Multiple Lines
  • Setting a Variable with Multiple Lines and Indentation
  • Conditionals
  • When
  • When with Multiple Conditions
  • Loops
  • Looping Over a List
  • Looping Over a Dictionary
  • Looping Over a Dictionary Using "with_dict".
  • Looping Over a List with "with_items"
  • Handlers
  • Using Handlers
  • Using Handlers with Multiple Tasks
  • Using Handlers with Multiple Tasks and Different Handlers
  • Conditional Execution
  • Using "ignore_errors" to Continue Execution Even After Failures
  • Using "changed_when" to Control When a Task Is Considered Changed
  • Using "failed_when" to Control When a Task Is Considered Failed
  • Failing a Playbook with "fail"
  • Vault
  • Editing an Encrypted File
  • Updating Encryption Password
  • Viewing an Encrypted File
  • Encrypting a File
  • Encrypting a File with a Password File
  • Decrypting a File
  • Encrypting a String
  • Encrypting a String with a Password File
  • Asynchronous Tasks
  • Running a Task Asynchronously
  • Checking the Status of Asynchronous Tasks
  • Roles
  • Creating a Role
  • Using a Role
  • Using a Role with Variables
  • Using a Role with Multiple Variables
  • Using a Role with Tags
  • Ansible Galaxy
  • Searching for Roles
  • Installing a Role
  • Installing a Role with a Specific Version
  • Ansible Collections
  • Installing a Collection
  • Installing a Collection with a Specific Version
  • Installing a Collection from a File
  • Installing a Collection from a Directory
  • Resources About Ansible
  • Official Ansible Documentation
  • Ansible Blogs and Articles
  • Ansible Community and Forums
  • Ansible GitHub Repository
  • Ansible Videos
  • Ansible Tools
  • IDE Extensions
  • VSCode
  • PyCharm
  • Sublime
  • Vim
  • Newsletters
  • Afterword
  • Your Feedback Matters.