← All Ansible Automation Flashcard Decks

Ansible Playbooks Flashcards

7 cards from real Ansible Automation practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Ansible Playbooks flashcards as text
  1. Which order does the Ansible Playbook execute?

    Answer: Playbook->Play->Tasks->Task

    An Ansible playbook is the highest-level organizational unit. A playbook contains one or more 'plays', each targeting a specific group of hosts. Within each play, there is a list of 'tasks', which are individual actions to be performed. Each 'task' then calls an Ansible module to execute a specific operation on the target host(s).

  2. What language is the default in which Ansible playbooks are written?

    Answer: YAML

    Ansible playbooks are written in YAML (YAML Ain't Markup Language). YAML is a human-friendly data serialization standard often used for configuration files due to its readability and straightforward syntax. This makes playbooks easy to read, write, and understand for defining automation workflows.

  3. What language is the default in which Ansible playbooks are written?

    Answer: YAML format

    Ansible playbooks are written in YAML (YAML Ain't Markup Language) format by default. YAML is chosen for its human-readable syntax, which makes playbooks easy to write, understand, and maintain. This declarative language allows users to define the desired state of their infrastructure and the tasks to achieve it in a clear and concise manner.

  4. Which command will you use to run a playbook called install.yaml with Ansible?

    Answer: ansible-playbook install.yml

    To execute an Ansible playbook, the specific command `ansible-playbook` is used, followed by the name of the playbook file. This command instructs Ansible to parse the playbook, connect to the managed hosts, and run the defined tasks in the specified order. The `ansible` command alone is typically reserved for running ad-hoc commands or single tasks, not full playbooks.

  5. Which argument will you use in your Ansible playbook to define a variable?

    Answer: -E

    In Ansible, while variables are commonly defined using the `vars:` keyword directly within a playbook, command-line arguments can also be used to pass variables. The `-e` or `--extra-vars` argument is typically used for this purpose, allowing users to define or override variables when running a playbook. If `-E` is interpreted as a variant or typo for this command-line functionality, it serves to inject variable values into the playbook's execution context.

  6. Unlike any other system currently, Ansible playbooks provide the foundation of a multi-machine deployment and a straightforward configuration management solution ideal for deploying complicated applications.

    Answer: TRUE

    Ansible playbooks are indeed a cornerstone for multi-machine deployments and configuration management. They provide a declarative way to define the desired state of systems across an entire infrastructure, simplifying the deployment of complex applications. This capability allows for consistent and efficient automation, making Ansible a powerful tool for managing diverse environments.

  7. What does the Ansible playbook phrase "become: yes" mean?

    Answer: It means that we would run all commands as root

    The `become: yes` directive in an Ansible playbook or task means that the commands within that task or playbook will be executed with elevated privileges. This is equivalent to using `sudo` on Linux/Unix systems, allowing Ansible to perform actions that require administrative permissions. It is crucial for tasks like installing software, modifying system configurations, or managing services.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. redhat.com — Score release, test delivery, renewal, score validity, exam information · verified Oct 2026
  2. docs.redhat.com — Fees, exam format, retake policy · verified Oct 2026