Ansible: Configuration Management & Automation
Ansible: Configuration Management & Automation
Up to 20 questions, shuffled on every run
Welcome to the Ansible Basics Quiz! This quiz covers fundamental Ansible concepts, modules, and best practices. Each question is multiple-choice, and you’ll find hints to help you along the way. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
Which command is used to execute an Ansible playbook?
Answer`ansible-playbook`
What is the default file path for the Ansible inventory file?
Answer`/etc/ansible/hosts`
Which keyword defines the remote user Ansible uses for SSH connections?
Answer`remote_user`
What is the primary purpose of the "become: yes" directive?
AnswerEnable privilege escalation
Which module is recommended for installing packages on RHEL-based systems?
Answer`dnf`
In Ansible, what is a "Fact"?
AnswerSystem information gathered
Which module transfers files from the control node to the remote server?
Answer`copy`
What does "Idempotency" mean in the context of automation?
AnswerConsistent state results
Which keyword allows a task to run only if a specific condition is met?
Answer`when`
Which tool is used to encrypt sensitive variables or files in Ansible?
Answer`ansible-vault`
Which module is used to ensure a service is running and enabled on boot?
Answer`service`
What is the specific purpose of "Handlers" in an Ansible play?
AnswerRun tasks upon notification
Which file extension is standard for Ansible playbooks?
Answer`.yml`
What does the "ansible_all_ipv4_addresses" variable represent?
AnswerTarget host IP list
Which flag validates playbook syntax without executing any tasks?
Answer`--syntax-check`
Which module is designed to modify a single specific line in a file?
Answer`lineinfile`
Which keyword is used to iterate over a list of items in a task?
Answer`loop`
What is an Ansible "Role" in a production environment?
AnswerReusable task structure
Which module executes commands through the remote shell environment?
Answer`shell`
What is the default SSH port Ansible uses for Linux connections?
Answer22
Which file defines global settings like fork count and SSH timeouts?
Answer`ansible.cfg`
What does the "register" keyword do within a task?
AnswerSaves task output
Which directive allows a playbook to continue if a task fails?
Answer`ignore_errors: yes`
Which module manages file properties like permissions and ownership?
Answer`file`
What is "Ansible Galaxy"?
AnswerContent repository hub
How is a host group defined in an INI-style inventory file?
Answer`[group_name]`
What characterizes "Ad-hoc mode" in Ansible?
AnswerSingle task execution
Which module is used to create files from Jinja2 templates?
Answer`template`
What is the primary function of the "debug" module?
AnswerDisplaying variable values
What does the "Forks" setting control in Ansible?
AnswerParallel host connections








