RedHat EX407 Exam
Red Hat Certified Specialist in Ansible Automation exam (Page 3 )

Updated On: 7-Feb-2026

Is it possible to specify multiple inventory files at once?

  1. Yes, you specify your inventory as a directory containing valid inventory files.
  2. No.
  3. Yes, you must provide extra parameters to the -i flag.
  4. Yes, you must specify a reference inventory master file.

Answer(s): A



What keyword stores a command's output into a variable?

  1. register
  2. output
  3. output is stored in a variable named results by default
  4. debug

Answer(s): A

Explanation:

The register keyword will store output from the preceding command into a provided variable.



What does the lineinfile module do?

  1. Allow addition of lines anywhere in a file
  2. Allows to grep for lines in a provided file
  3. Allow additions of lines to the end of a file only
  4. Input data into a file from stdin

Answer(s): A

Explanation:

The purpose of the lineinfile module is to add lines anywhere in a file passed on a pattern.



Consider the following playbook.

---
- hosts: local
become: yes

tasks:
- name: create users
user: name: "{{item}}" with_items:

- sam
- john
- bob

How many times is the user module invoked?

  1. 5
  2. 3
  3. 1
  4. 0

Answer(s): B

Explanation:

The call count will be based on the number of times the with_items loop executes - which is 3 in this case



What command is used to run a playbook?

  1. ansible-playbook <playbook>
  2. ansible <playbook>
  3. ansible-p <playbook>
  4. playbook <playbook>

Answer(s): A

Explanation:

This command will run a given playbook successfully.



Viewing page 3 of 22
Viewing questions 11 - 15 out of 101 questions



Post your Comments and Discuss RedHat EX407 exam prep with other Community members:

Join the EX407 Discussion