Automation, Orchestration, and Scripting
A single playbook must install httpd on RHEL-family hosts and apache2 on Debian-family hosts. Which Ansible component supplies the OS family value used in the when condition?
Show the answer
Correct answerC. Facts gathered by the setup module
The setup module gathers facts such as ansible_facts['os_family'], which a when condition can test at runtime. Inventory group names only work if an admin grouped hosts by OS manually; they are not discovered from the system.