Ansible: Configuration Management & Automation

20 QuestionsIntermediatePublished:

Ansible: Configuration Management & Automation

Up to 20 questions, shuffled on every run

Quiz Configuration
Enterto start

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.

  1. Which command is used to execute an Ansible playbook?

    Answer`ansible-playbook`

  2. What is the default file path for the Ansible inventory file?

    Answer`/etc/ansible/hosts`

  3. Which keyword defines the remote user Ansible uses for SSH connections?

    Answer`remote_user`

  4. What is the primary purpose of the "become: yes" directive?

    AnswerEnable privilege escalation

  5. Which module is recommended for installing packages on RHEL-based systems?

    Answer`dnf`

  6. In Ansible, what is a "Fact"?

    AnswerSystem information gathered

  7. Which module transfers files from the control node to the remote server?

    Answer`copy`

  8. What does "Idempotency" mean in the context of automation?

    AnswerConsistent state results

  9. Which keyword allows a task to run only if a specific condition is met?

    Answer`when`

  10. Which tool is used to encrypt sensitive variables or files in Ansible?

    Answer`ansible-vault`

  11. Which module is used to ensure a service is running and enabled on boot?

    Answer`service`

  12. What is the specific purpose of "Handlers" in an Ansible play?

    AnswerRun tasks upon notification

  13. Which file extension is standard for Ansible playbooks?

    Answer`.yml`

  14. What does the "ansible_all_ipv4_addresses" variable represent?

    AnswerTarget host IP list

  15. Which flag validates playbook syntax without executing any tasks?

    Answer`--syntax-check`

  16. Which module is designed to modify a single specific line in a file?

    Answer`lineinfile`

  17. Which keyword is used to iterate over a list of items in a task?

    Answer`loop`

  18. What is an Ansible "Role" in a production environment?

    AnswerReusable task structure

  19. Which module executes commands through the remote shell environment?

    Answer`shell`

  20. What is the default SSH port Ansible uses for Linux connections?

    Answer22

  21. Which file defines global settings like fork count and SSH timeouts?

    Answer`ansible.cfg`

  22. What does the "register" keyword do within a task?

    AnswerSaves task output

  23. Which directive allows a playbook to continue if a task fails?

    Answer`ignore_errors: yes`

  24. Which module manages file properties like permissions and ownership?

    Answer`file`

  25. What is "Ansible Galaxy"?

    AnswerContent repository hub

  26. How is a host group defined in an INI-style inventory file?

    Answer`[group_name]`

  27. What characterizes "Ad-hoc mode" in Ansible?

    AnswerSingle task execution

  28. Which module is used to create files from Jinja2 templates?

    Answer`template`

  29. What is the primary function of the "debug" module?

    AnswerDisplaying variable values

  30. What does the "Forks" setting control in Ansible?

    AnswerParallel host connections

Was this useful?

You might also enjoy

Check out some of our other posts on similar topics

Terragrunt: Infrastructure as Code Management

Terragrunt: Infrastructure as Code Management

Welcome to the Terragrunt Basics Quiz! This quiz covers fundamental Terragrunt concepts, including DRY configuration management, remote state handling, module dependencies, and best practices for mana

Packer: Infrastructure Image Building Fundamentals

Packer: Infrastructure Image Building Fundamentals

Welcome to the Packer Basics Quiz! Mastering Packer is the key to creating consistent, automated machine images across any platform. This quiz will test your knowledge of how Packer builds, provisione

Terraform: Infrastructure as Code Essentials

Terraform: Infrastructure as Code Essentials

Welcome to the Terraform Basics Quiz! This quiz is designed to test your understanding of fundamental Terraform concepts and best practices. Each question is multiple-choice, and you'll find hints to

CI/CD: Pipeline Automation Essentials

CI/CD: Pipeline Automation Essentials

Welcome to the CI/CD Basics Quiz! This quiz covers fundamental continuous integration and continuous delivery concepts, pipeline automation, and modern DevOps best practices. Each question is multiple

Jenkins: CI/CD Automation & Pipeline Management

Jenkins: CI/CD Automation & Pipeline Management

Welcome to the Jenkins Basics Quiz! This quiz covers fundamental Jenkins concepts, including pipeline as code, Jenkinsfile syntax, agents and stages, build automation, plugins, and CI/CD best practice

GitHub Actions: Workflow Automation Essentials

GitHub Actions: Workflow Automation Essentials

Welcome to the GitHub Actions Basics Quiz! This quiz covers the fundamentals of GitHub Actions, including workflows, jobs, steps, triggers, and best practices. Test your knowledge and see how well you

6 related posts