Red Hat Certified Specialist in Ansible Automation — Question 2
Templates have access to variables scoped at which of the following levels? (Choose all that apply.)
Answer options
- A. Hostgroup targeted by current play
- B. Ansible Facts
- C. Variables defined within the current play
- D. Any host variables defined in inventory
Correct answer: A, B, C
Explanation
The correct answers A, B, and C are all types of variable scopes that templates can access during execution. Option D is incorrect because host variables defined in inventory are not directly accessible within the scope of the current play.