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

Using Ansible for Configuring IaaS Infrastructure

In the previous chapter, we talked about the provisioning of an Azure cloud infrastructure with Terraform. If this infrastructure contains virtual machines (VMs), after their provisioning, it is necessary to configure their systems and install all middleware. This configuration will be necessary for the proper functioning of the applications that will be hosted on the VM.

There are several Infrastructure as Code (IaC) tools available for configuring VMs and the best known are Ansible, Puppet, Chef, SaltStack, and PowerShell DSC. Among them, Ansible from Red Hat (https://www.ansible.com/overview/it-automation) stands out for its many assets:

  • It is declarative and uses the easy-to-read YAML language.
  • Ansible only works with one executable.
  • It does not require agents installed on the VMs to be configured.
  • A simple SSL/WinRM connection is required for Ansible to connect to remote VMs.
  • It has a template engine and a vault to encrypt/decrypt sensitive data.
  • It is idempotent.

It should also be noted that Ansible does not only configure VMs, but it can also do infrastructure provisioning and security compliance.

In this chapter, we will see how to install Ansible, and then use it to configure a VM with an inventory and a playbook. We will also see how to protect sensitive data with Ansible Vault and finally, this chapter will discuss the use of a dynamic inventory in Azure.

The following topics are covered in this chapter:

  • Installing Ansible
  • Creating an Ansible inventory
  • Executing the first playbook
  • Protecting data with Ansible Vault
  • Using a dynamic inventory for an Azure infrastructure
主站蜘蛛池模板: 蓝山县| 阳新县| 舟曲县| 酒泉市| 新邵县| 巴彦淖尔市| 奈曼旗| 上林县| 天气| 武穴市| 宜君县| 友谊县| 永善县| 辽中县| 英德市| 瓮安县| 平泉县| 襄城县| 永德县| 西盟| 福泉市| 师宗县| 南和县| 奈曼旗| 曲靖市| 秦皇岛市| 周口市| 成都市| 湘乡市| 天峨县| 泰兴市| 河间市| 梁河县| 宜城市| 隆回县| 明水县| 尚义县| 阜新| 八宿县| 武乡县| 沙河市|