Ansible Advanced Quiz
← Back to Quiz Home
Test your deep expertise on custom plugins, optimization, and complex automation scenarios.
Which strategy plugin drastically improves execution speed by using persistent SSH connections?
Mitogen for Ansible replaces the default Ansible execution engine to provide significant speedups.
How can you avoid the overhead of module transfer and Python startup on every task?
Pipelining reduces the number of SSH operations required to execute a module.
What is the best way to handle different package names (e.g., httpd vs apache2) across OS families?
Separating data from logic using OS-specific variable files is the cleanest pattern.
What does check_mode: yes do?
Modules supporting check mode will report what would have changed.
Which feature allows you to query external data sources (like DNS, Consul, or Vault) dynamically?
Lookups allow retrieving data from outside blocks (variables, loops) via {{ lookup(...) }}.
How do you execute a playbook on local infrastructure (pull mode) instead of push mode?
ansible-pull checks out a repo and runs the playbook locally, reversing the standard push architecture.
Which callback plugin can be used to profile task execution time to find bottlenecks?
profile_tasks lists the slowest tasks and the total time consumed.
Fact caching improves performance by reducing the need to run the setup module repeatedly.
How do you write a custom filter plugin?
Filter plugins extend Jinja2 capabilities using Python code.
What is the changed_when directive used for?
It overrides the default change detection, often used with command or shell modules which always return changed by default.
What is the purpose of meta: refresh_inventory?
It allows the playbook to become aware of newly created hosts in a dynamic inventory.
How do you pass a variable reference (not value) to a role?
Ansible variables are generally passed by value / templated early. Indirect reference requires looking up the value using the name.
Which testing framework is the standard for testing Ansible Roles using containers?
Molecule automates the creation, convergence, and verification of roles in isolated environments.
What is an "Execution Environment" (EE)?
EEs solve the "dependency hell" problem by packaging the execution context.
How do you handle a task that must run on the control node but use the variables of the remote host?
delegate_to: localhost runs the command locally while preserving the inventory_hostname context of the loop item.
What is the precise difference between ignore_errors: yes and failed_when: false?
If you expect a non-zero exit code and want to treat it as success, use failed_when: false.
How can you limit the execution of a playbook to a specific "batch" of hosts at a time to prevent downtime?
serial: 30% ensures only 30% of hosts are updated at once.
Which module allows you to make API calls directly from a playbook?
The uri module is a powerful HTTP client for interacting with REST APIs.
What is ansible-builder used for?
It builds the container images used by Automation Controller (AAP).
How do you perform a "Linear" strategy execution with a "Free" strategy for a specific play?
Strategies can be defined per-play.
Quiz Progress
0 / 0 questions answered
(0%)
0 correct
Quiz Complete!
0%