Learning DevOps
上QQ阅读APP看书,第一时间看更新

Ansible artifacts

To configure a system, Ansible needs several main artifacts:

  • The hosts: These are target systems that Ansible will configure; the host can also be a local system.
  • The inventory: This is a file in INI or YAML format that contains the list of target hosts on which Ansible will perform configuration actions. This inventory can also be a script, which is the case with a dynamic inventory.
We will see the implementation of the inventory next, in the Creating an inventory for targeting Ansible host section, and a dynamic inventory in the Using a dynamic inventory for Azure infrastructure section.
  • The playbook: This is the Ansible configuration script that will be executed to configure hosts.
Writing playbooks will be seen in the Writing the first playbook section later in this chapter.

After seeing how to install Ansible, we have just gone through the essential elements of Ansible, which are hosts, inventory, and playbooks. We will now see how to configure Ansible.