官术网_书友最值得收藏!

Understanding the Fundamentals of Ansible

Ansible is, at its heart, a simple framework that pushes a small program called an Ansible module to target nodes. Modules are at the heart of Ansible and are responsible for performing all of the automation's hard work. The Ansible framework goes beyond this, however, and also includes plugins and dynamic inventory management, as well as tying all of this together with playbooks to automate infrastructure provisioning, configuration management, application deployment, network automation, and much more, as shown:

Ansible only needs to be installed on the management node; from there, it distributes the required modules over the network's transport layer (usually SSH or WinRM) to perform tasks and deletes them once the tasks are complete. In this way, Ansible retains its agentless architecture and does not clutter up your target nodes with code that might be required for a one-off automation task.

In this chapter, you will learn more about the composition of the Ansible framework and its various components, as well as how to use them together in playbooks written in YAML syntax. So, you will learn how to create automation code for your IT operations tasks and learn how to apply this using both ad hoc tasks and more complex playbooks. Finally, you will learn how Jinja2 templating allows you to repeatably build dynamic configuration files using variables and dynamic expressions.

In this chapter, we will cover the following topics:

  • Getting familiar with the Ansible framework
  • Exploring the configuration file
  • Command-line arguments
  • Defining variables
  • Understanding Jinja2 filters
主站蜘蛛池模板: 巴彦淖尔市| 建阳市| 弥勒县| 贵港市| 江永县| 金平| 姚安县| 调兵山市| 洛川县| 淮南市| 许昌县| 卫辉市| 丰都县| 芒康县| 庆阳市| 沿河| 昌江| 府谷县| 饶河县| 兰溪市| 武宁县| 灵璧县| 龙游县| 偏关县| 高雄市| 札达县| 滨州市| 承德县| 定结县| 鸡东县| 罗甸县| 奉贤区| 新晃| 东台市| 望城县| 木里| 垫江县| 天峻县| 乐清市| 余干县| 承德县|