← All Ansible Automation Flashcard Decks

Ansible Modules & Task Execution Flashcards

6 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 6 Ansible Modules & Task Execution flashcards as text
  1. Which Ansible module is used to copy a file from the control node to a managed host?

    Answer: copy

    The copy module transfers files from the Ansible control node (or a defined src path) to a destination on the managed host.

  2. What does the 'fetch' module do in Ansible?

    Answer: Retrieves a file from a managed host to the control node

    The fetch module is the reverse of copy — it pulls a file from the managed host back to the Ansible control node.

  3. Which module would you use to ensure a system package is installed on a host regardless of the package manager?

    Answer: package

    The generic 'package' module uses the host's detected package manager automatically, making playbooks more portable across distributions.

  4. What is the purpose of the 'template' module?

    Answer: Render a Jinja2 template and write the result to a file on the managed host

    The template module processes a Jinja2 (.j2) file using current variables and writes the rendered output to the specified destination path.

  5. Which module is used to run arbitrary shell commands that require shell features like pipes or redirects?

    Answer: shell

    The shell module runs commands through /bin/sh, enabling shell features like pipes, redirects, and environment variable expansion.

  6. What is the key difference between the 'command' and 'shell' modules?

    Answer: command does not invoke a shell; shell does, enabling pipes and redirects

    The command module executes a program directly without a shell, making it safer and more predictable, while shell passes the command to /bin/sh.

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