Mastering Ansible - Fourth Edition: Automate configuration management and overcome deployment challenges with Ansible

James Freeman , Jesse Keating

  • 出版商: Packt Publishing
  • 出版日期: 2021-12-09
  • 售價: $1,700
  • 貴賓價: 9.5$1,615
  • 語言: 英文
  • 頁數: 540
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1801818789
  • ISBN-13: 9781801818780
  • 相關分類: Ansible
  • 海外代購書籍(需單獨結帳)



Key Features

  • Completely revised and updated for Ansible 4.0 and beyond
  • Tackle complex automation challenges with the newly added features in Ansible
  • Learn about the rapidly expanding field of network automation using Ansible, with the help of practical examples for configuring network devices

Book Description

Ansible is a modern, YAML-based automation tool (built on top of Python, one of the world’s most popular programming languages) with a massive and ever-growing user base. Its popularity and Python underpinnings make it essential learning for all in the DevOps space.

This fourth edition of Mastering Ansible provides complete coverage of Ansible automation, from the design and architecture of the tool and basic automation with playbooks to writing and debugging your own Python-based extensions.

You'll learn how to build automation workflows with Ansible’s extensive built-in library of collections, modules, and plugins. You'll then look at extending the modules and plugins with Python-based code and even build your own collections — ultimately learning how to give back to the Ansible community.

By the end of this Ansible book, you'll be confident in all aspects of Ansible automation, from the fundamentals of playbook design to getting under the hood and extending and adapting Ansible to solve new automation challenges.

What you will learn

  • Gain an in-depth understanding of how Ansible works under the hood
  • Get to grips with Ansible collections and how they are changing and shaping the future of Ansible
  • Fully automate the Ansible playbook executions with encrypted data
  • Use blocks to construct failure recovery or cleanup
  • Explore the playbook debugger and Ansible console
  • Troubleshoot unexpected behavior effectively
  • Work with cloud infrastructure providers and container systems

Who this book is for

If you are an Ansible developer or operator who has a detailed understanding of its core elements and applications but are now looking to enhance your skills in applying automation using Ansible, this book is for you. Prior experience working with core system administration tasks on Linux and basic familiarity with concepts such as cloud computing, containers, network devices, and fundamentals of a high-level programming language will help you make the most of this book.




  • 完全修訂並更新至 Ansible 4.0 及以後版本

  • 利用 Ansible 新增的功能應對複雜的自動化挑戰

  • 通過實際範例學習使用 Ansible 進行網絡自動化,了解這個快速發展的領域


Ansible 是一個現代化的基於 YAML 的自動化工具(建立在 Python 之上,Python 是全球最受歡迎的程式語言之一),擁有龐大且不斷增長的用戶群。它的受歡迎程度和 Python 的基礎使其成為 DevOps 領域中必學的技能。

《精通 Ansible》第四版全面介紹了 Ansible 自動化的各個方面,從工具的設計和架構,到使用 playbook 進行基本自動化,再到編寫和調試自己的基於 Python 的擴展。

您將學習如何使用 Ansible 內置的豐富庫、模組和插件來構建自動化工作流程。然後,您將研究如何使用基於 Python 的代碼擴展模組和插件,甚至構建自己的庫集合,最終學習如何回饋給 Ansible 社區。

通過閱讀本書,您將對 Ansible 自動化的各個方面充滿信心,從 playbook 設計的基礎知識到深入了解並擴展 Ansible 以解決新的自動化挑戰。


  • 深入了解 Ansible 的內部運作原理

  • 掌握 Ansible 集合的使用方式,以及它們如何改變和塑造 Ansible 的未來

  • 使用加密數據完全自動化 Ansible playbook 的執行

  • 使用區塊構建失敗恢復或清理

  • 探索 playbook 調試器和 Ansible 控制台

  • 有效地排除意外行為

  • 與雲基礎設施提供商和容器系統一起工作


如果您是一位 Ansible 開發人員或操作員,對其核心元素和應用有詳細的了解,但現在希望提升使用 Ansible 進行自動化的技能,那麼本書適合您。在閱讀本書時,具備在 Linux 上進行核心系統管理任務的經驗,以及對雲計算、容器、網絡設備和高級程式語言基礎概念的基本熟悉,將有助於您充分利用本書的內容。


James Freeman is an accomplished IT consultant with over 20 years' experience in the technology industry. He has more than 8 years of first-hand experience of solving real-world enterprise problems in production environments using Ansible, frequently introducing Ansible as a new technology to businesses and CTOs for the first time. In addition, he has authored and facilitated bespoke Ansible workshops and training sessions, and has presented at both international conferences and meetups on Ansible Jesse Keating is an accomplished Ansible user, contributor, and presenter. He has been an active member of the Linux and open source community for over 15 years. He has firsthand experience involving a variety of IT activities, software development, and large-scale system administration. He has presented at numerous conferences and meetups, and has written many articles on a variety of topics.


James Freeman是一位在科技行業擁有超過20年經驗的優秀IT顧問。他擁有超過8年的實際經驗,在生產環境中使用Ansible解決真實的企業問題,並經常將Ansible作為一項新技術介紹給企業和首席技術官。此外,他還撰寫並主持定制的Ansible工作坊和培訓課程,並在國際會議和聚會上就Ansible發表演講。Jesse Keating是一位優秀的Ansible用戶、貢獻者和演講者。他在Linux和開源社區活躍了超過15年。他有豐富的IT活動、軟件開發和大規模系統管理的實際經驗。他在許多會議和聚會上發表演講,並撰寫了許多關於各種主題的文章。


Table of Contents

  1. System Architecture and Design of Ansible
  2. Migrating from Earlier Ansible Versions
  3. Protecting Your Secrets with Ansible
  4. Ansible and Windows - Not just for Linux
  5. Infrastructure management for Enterprises with AWX
  6. Unlocking the Power of Jinja2 Templates
  7. Controlling Task Conditions
  8. Composing Reusable Ansible Content with Roles
  9. Troubleshooting Ansible
  10. Extending Ansible
  11. Minimizing Downtime with Rolling Deployments
  12. Infrastructure Provisioning
  13. Network Automation



  1. Ansible 的系統架構和設計

  2. 從早期版本遷移至 Ansible

  3. 使用 Ansible 保護您的機密資訊

  4. Ansible 和 Windows - 不僅僅適用於 Linux

  5. 使用 AWX 進行企業級基礎設施管理

  6. 發揮 Jinja2 模板的威力

  7. 控制任務條件

  8. 使用角色創建可重複使用的 Ansible 內容

  9. 解決 Ansible 問題

  10. 擴展 Ansible

  11. 使用滾動部署最小化停機時間

  12. 基礎設施供應

  13. 網絡自動化