← All Ansible Automation Flashcard Decks

Ansible Inventory & Configuration Management 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 Inventory & Configuration Management flashcards as text
  1. What makes an inventory script 'dynamic' in Ansible?

    Answer: It is executable and returns JSON inventory data when called

    A dynamic inventory script must be executable and output valid JSON when called with --list or --host arguments.

  2. Which command-line argument does Ansible pass to a dynamic inventory script to retrieve all hosts and groups?

    Answer: --list

    Ansible calls the dynamic inventory script with --list to get a full JSON structure of all groups, hosts, and variables.

  3. In a YAML inventory file, how do you define a host with a variable?

    Answer: hosts:\n server1:\n ansible_user: admin

    YAML inventory uses a nested structure under 'hosts' where each host key can have variable key-value pairs beneath it.

  4. What special group in Ansible contains every host in the inventory?

    Answer: all

    The built-in 'all' group implicitly contains every host defined in the inventory.

  5. Which Ansible command can be used to verify and display the parsed inventory?

    Answer: ansible-inventory --list

    The ansible-inventory --list command outputs the fully parsed inventory as JSON, useful for debugging.

  6. Which inventory variable sets the Python interpreter Ansible uses on a managed host?

    Answer: ansible_python_interpreter

    Setting ansible_python_interpreter tells Ansible which Python binary to use on the target host (e.g., /usr/bin/python3).

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