Which of the following statements accurately describes how facts are gathered or referenced when using Ansible or Puppet in a Linux automation workflow?
Puppet facts are available exclusively on agent nodes and cannot be evaluated during catalog compilation on the Puppet Server.
Ansible gathers facts on the control node and stores them in the ansible_local namespace before pushing them to managed hosts.
The gather_facts play-level parameter in Ansible defaults to no, meaning facts are gathered only when the setup module is explicitly called.
In Puppet, system information is collected by the Facter tool and can be referenced in manifests with $::fact_name or $facts['fact_name'].
Facter, the data-collection utility that ships with Puppet, runs on each node before catalog compilation and exposes the discovered values to manifests. Those values can be referenced either as top-scope variables using the $::fact_name convention or through the structured $facts['fact_name'] hash. Ansible, on the other hand, gathers facts on every managed host (not on the control node) with the setup module and does so automatically because gather_facts defaults to yes. Since Puppet facts are available to the compiler on the primary server, and Ansible's default behaviour is to gather facts, the only fully correct statement is the one describing Facter and the two supported syntaxes. The remaining statements are incorrect because they place fact gathering on the wrong machine, misstate the default for gather_facts, or claim that Puppet facts cannot be used during catalog compilation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Facter in Puppet?
Open an interactive chat with Bash
How does Ansible gather facts from managed hosts?
Open an interactive chat with Bash
Can Puppet facts be used during catalog compilation on the Puppet Server?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access