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

Updated On: 7-Feb-2026

Consider the following playbook.

- hosts: webservers
become: yes

- name: install httpd
yum:
name: httpd
state: latest

Which line includes a syntax error?

  1. become: yes – there is no attribute called become
  2. yum: – yum should be proceeded with a hyphen
  3. The file does not end with end-playbook.
  4. The playbook does not include the task directive.

Answer(s): D

Explanation:

The "task:" directive is required at the prior to providing the tasks of a playbook. Without it, Ansible will not throw an error.



Which of the following attributes specifies how a handler can be notified? (Choose all that apply.)

  1. name
  2. service
  3. listen
  4. handle

Answer(s): A,C

Explanation:

While using the handler's name attribute is not encouraged, it does work.



What is the primary difference between the shell and command module?

  1. The shell module is for executing shell commands, and the command module is for Ansible internal commands.
  2. The shell module sets up a shell environment and the command module only runs the provided command.
  3. The shell module sets a default shell whereas the command module executes a shell command.
  4. There is no difference.

Answer(s): B



Which command is the correct way to run the playbook /home/ansible/Buildwww.yml using the inventory file / home/ansible/inventory, assuming your present working directory is /home/ansible?

  1. ansible -i inventory Build.yml
  2. ansible -i inventory -p Buildwww.yml
  3. ansible-playbook -i inventory -p Buildwww.yml
  4. ansible-playbook -i inventory Buildwww.yml

Answer(s): D

Explanation:

This command is the correct way to run the playbook using the requested inventory



Which Ansible ad-hoc flag is analogous to the become directive?

  1. b
  2. f
  3. i
  4. B

Answer(s): A

Explanation:

The b flag actually stands for become! They both have Ansible escalate to the become_user.



Viewing page 4 of 22
Viewing questions 16 - 20 out of 101 questions



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

Join the EX407 Discussion