A team of administrators is reviewing Puppet code that relies on expressions such as $facts["os"]["family"] to choose the right package repository for each node. One colleague asks where the data in the $facts hash actually comes from and when it is gathered during a typical agent run. Which explanation is correct?
They are discovered by the Facter binary that runs locally on the agent before the catalog request, and the collected key/value pairs are sent with that request.
They are generated by an Ansible setup script that the agent downloads during plugin sync and executes after the catalog is applied.
They come from environment variables exported by systemd at boot and read by Puppet through a cron job every 30 minutes.
They are retrieved from a cached facts file on the Puppet Server after the catalog has already been compiled and then injected into the catalog.
Puppet gathers facts by executing the Facter utility on every agent node at the very beginning of the run, before the node requests its catalog from the server. Facter discovers host information (CPU count, OS family, IP addresses, and so on) and sends those key/value pairs to the Puppet Server as part of the catalog request, where they are exposed in manifests through the $facts hash. The other options are incorrect because facts are not sourced from a server-side cache created after compilation, are not produced by Ansible tooling, and are not read from environment variables provided by systemd or cron.
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
When does the Facter utility run in the Puppet lifecycle?
Open an interactive chat with Bash
How are facts stored and accessed in Puppet manifests?
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