Free EX407 Exam Dumps

No Installation Required, Instantly Prepare for the EX407 exam and please click the below link to start the EX407 Exam Simulator with a real EX407 practice exam questions.
Use directly our on-line EX407 exam dumps materials and try our Testing Engine to pass the EX407 which is always updated.

  • Exam Code: EX407
  • Exam Title: Red Hat Certified Specialist in Ansible Automation exam
  • Vendor: Red-Hat
  • Exam Questions: 41
  • Last Updated: March 9th,2026

Question 1

CORRECT TEXT
Install and configure ansible
User bob has been created on your control node. Give him the appropriate permissions on the control node. Install the necessary packages to run ansible on the control node.
Create a configuration file /home/bob/ansible/ansible.cfg to meet the following requirements:
• The roles path should include /home/bob/ansible/roles, as well as any other path that may be required for the course of the sample exam.
• The inventory file path is /home/bob/ansible/inventory.
• Ansible should be able to manage 10 hosts at a single time.
• Ansible should connect to all managed nodes using the bob user. Create an inventory file for the following five nodes: nodel.example.com
node2.example.com node3.example.com node4.example.com node5.example.com
Configure these nodes to be in an inventory file where node1 is a member of group dev. nodc2 is a member of group test, nodc3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.
Solution:
In/home/sandy/ansible/ansible.cfg [defaults] inventory=/home/sandy/ansible/inventory
roles_path=/home/sandy/ansible/roles remote_user= sandy host_key_checking=false [privilegeescalation]
become=true become_user=root become_method=sudo become_ask_pass=false
In /home/sandy/ansible/inventory
[dev]
node 1 .example.com [test] node2.example.com [proxy]
node3 .example.com [prod] node4.example.com node5 .example.com [webservers:children] prod

Does this meet the goal?

Correct Answer:A

Question 2

CORRECT TEXT
Create a file called adhoc.sh in /home/sandy/ansible which will use adhoc commands to set up a new repository. The name of the repo will be 'EPEL' the description 'RHEL8' the baseurl is 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp' there is no gpgcheck, but you should enable the repo.
* You should be able to use an bash script using adhoc commands to enable repos. Depending on your lab setup, you may need to make this repo "state=absent" after you pass this task.
Solution:
chmod 0777 adhoc.sh vim adhoc.sh
#I/bin/bash
ansible all -m yum_repository -a 'name=EPEL description=RHEL8 baseurl=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp gpgcheck=no enabled=yes'

Does this meet the goal?

Correct Answer:A

Question 3

CORRECT TEXT
===================================================================================
control.realmX.example.com _ workstation.lab.example.com node1.realmX.example.com _ servera.lab.example.com node2.realmX.example.com _ serverb.lab.example.com node3.realmX.example.com _ serverc.lab.example.com node4.realmX.example.com _ serverd.lab.example.com node5.realmX.example.com
- username:root, password:redhat
- username:admin, password:redhat
note1. don??t change ??root?? or ??admin?? password.
note2. no need to create ssh-keygen for access, its pre-defined
note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.
===================================================================================
Use Ansible Galaxy with a requirements file called /home/admin/ansible/roles/ install.yml to download and install roles to /home/admin/ansible/roles from the following URLs:
http:// classroom.example.com /role1.tar.gz The name of this role should be balancer http:// classroom.example.com /role2.tar.gz The name of this role should be phphello
Solution:
Solution as:
# pwd
/home/admin/ansible/roles
# vim install.yml
---
- src: http://classroom.example.com/role1.tar.gz name: balancer
- src: http://classroom.example.com/role2.tar.gz name: phphello
wq!
# pwd
/home/admin/ansible
# ansible-galaxy install -r roles/install.yml -p roles

Does this meet the goal?

Correct Answer:A

Question 4

CORRECT TEXT
In /home/sandy/ansible/ create a playbook called logvol.yml. In the play create a logical
volume called Iv0 and make it of size 1500MiB on volume group vgO If there is not enough space in the volume group print a message "Not enough space for logical volume" and then make a 800MiB Iv0 instead. If the volume group still doesn't exist, create a message "Volume group doesn't exist" Create an xfs filesystem on all Iv0 logical volumes. Don't mount the logical volume.
Solution:
Solution as:
EX407 dumps exhibit

Does this meet the goal?

Correct Answer:A

Question 5

CORRECT TEXT
=====================================================================
==============
control.realmX.example.com _ workstation.lab.example.com
node1.realmX.example.com _ servera.lab.example.com
node2.realmX.example.com _ serverb.lab.example.com
node3.realmX.example.com _ serverc.lab.example.com
node4.realmX.example.com _ serverd.lab.example.com
node5.realmX.example.com
- username:root, password:redhat
- username:admin, password:redhat
note1. don??t change ??root?? or ??admin?? password.
note2. no need to create ssh-keygen for access, its pre-defined
note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.
=====================================================================
==============
Create a playbook called hwreport.yml that produces an output file called /root/ hwreport.txt on all managed nodes with the following information:
------------------------------------------------------------------------------------------------------
--> Inventory host name
--> Total memory in MB
--> BIOS version
--> Size of disk device vda
--> Size of disk device vdb
Each line of the output file contains a single key-value pair.
* Your playbook should:
--> Download the file hwreport.empty from the URL http://classroom.example.com/
hwreport.empty and
save it as /root/hwreport.txt
--> Modify with the correct values.
note: If a hardware item does not exist, the associated value should be set to NONE
----------------------------------------------------------------------------------------------
while practising you to create these file hear. But in exam have to download as per questation.
hwreport.txt file consists. my_sys=hostname my_BIOS=biosversion my_MEMORY=memory my_vda=vdasize my_vdb=vdbsize
Solution:
Solution as:
# pwd
/home/admin/ansible
# vim hwreport.yml
- name: hosts: all
ignore_errors: yes tasks:
- name: download file get_url:
url: http://classroom.example.com/content/ex407/hwreport.empty dest: /root/hwreport.txt
- name: vdasize replace:
regexp: "vdasize"
replace: "{{ ansible_facts.devices.vda.size }}"
dest: /root/hwreport.txt register: op1
- debug: var: op1
- name: none replace:
regexp: "vdasize" replace: NONE
dest: /root/hwreport.txt
when:
op1.failed == true
- name: vdbsize replace:
regexp: "vdbsize"
replace: "{{ ansible_facts.devices.vdb.size }}" dest: /root/hwreport.txt
register: op2
- debug: var: op2
- name: none replace:
regexp: "vdbsize" replace: NONE
dest: /root/hwreport.txt when:
op2.failed == true
- name: sysinfo replace:
regexp: "{{item.src}}"
replace: "{{item.dest}}" dest: /root/hwreport.txt loop:
- src: "hostname"
dest: "{{ ansible_facts.fqdn }}"
- src: "biosversion"
dest: "{{ ansible_facts.bios_version }}"
- src: "memory"
dest: "{{ ansible_facts.memtotal_mb }}" wq!
# ansible-playbook hwreport.yml -–syntax-check
# ansible-playbook hwreport.yml

Does this meet the goal?

Correct Answer:A