Using Ansible to collect server details
In the previous chapter, you learned how to use Ansible for basic automation by using simple playbooks and tasks. In this chapter, you will learn more by automating the simple day-to-day jobs in your workplace.
An up-to-date system inventory with easy access is the dream of every system engineer and IT team. In large enterprises, it is common to use configuration management database (CMDB) software. However, engineers must maintain their spreadsheets to keep the server and device information they are managing. When you have software-defined infrastructures such as virtual machines and virtual appliances, verifying and updating these local spreadsheets will become a tedious task.
Maintaining such information can be automated using Ansible, as shown in the following diagram:
Figure 3.1 – Maintaining a system information database using Ansible
Ansible and ansible_facts
can be used to create and update your...