Junior — Middle
What methods can be used to automatically detect delays in the user interface rendering process?
sobes.tech AI
Answer from AI
In Ansible, the list of target hosts (inventory) can be specified in several ways:
- Static inventory file — the most common method. This is a file in INI or YAML format, listing hosts and host groups.
[webservers]
web1.example.com
web2.example.com
[dbservers]
db1.example.com
-
Dynamic inventory — a script or plugin that generates the host list on the fly, for example, from a cloud provider (AWS, GCP).
-
-iparameter in the command line — you can specify a particular inventory file or script when running ansible or ansible-playbook. -
Defining hosts in the playbook — in the
hostssection of the playbook, you can specify a group or a specific host. -
Using the
hostsvariable in ad-hoc commands — for example,ansible webservers -m ping.
Thus, the list of target hosts is set via inventory files, dynamic sources, or directly in playbooks/commands.