Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > Red Hat > Red Hat Certifications > EX407 > EX407 Online Practice Questions and Answers

EX407 Online Practice Questions and Answers

Questions 4

Create a playbook /home/bob/ansible/timesync.yml that runs on hosts in the webservers host group and does the following:

1.

Uses the timesync RHEL system role.

2.

Sets the ntp server to 0.uk.pool.ntp.org

3.

Sets the timezone to UTC

Buy Now

Correct Answer:

See the for complete Solution below. Solution as:

Questions 5

Create a file called specs.empty in home/bob/ansible on the local machine as follows:

HOST= MEMORY= BIOS= VDA_DISK_SIZE= VDB_DISK_SIZE=

Create the playbook /home/bob/ansible/specs.yml which copies specs.empty to all remote nodes' path/root/specs.txt. Using the specs.yml playbook then edit specs.txt on the remote machines to reflect the appropriate ansible facts.

Buy Now

Correct Answer:

See the for complete Solution below. Solution as:

Questions 6

Install and configure ansible

User bob has been created on your control node. Give him the appropriate permissions on thecontrol 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:

1.

The roles path should include /home/bob/ansible/roles, as well as any otherpath that may be required for the course of the sample exam.

2.

The inventory file path is /home/bob/ansible/inventory.

3.

Ansible should be able to manage 10 hosts at a single time.

4.

Ansible should connect to all managed nodes using the bobuser. Create an inventory file for the following five nodes:

1.

node1.example.com

2.

node2.example.com

3.

node3.example.com

4.

node4.example.com

5.

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.

Buy Now

Correct Answer:

See the for complete Solution below.

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

Questions 7

Which is the default inventory file used by Ansible?

A. ${PWD}/.inventory

B. /etc/hosts

C. /etc/ansible/inventory

D. /etc/ansible/hosts

Buy Now

Correct Answer: D

Ansbile refers to /etc/ansible/hosts as the default inventory.

Questions 8

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?

A. 5

B. 3

C. 1

D. 0

Buy Now

Correct Answer: B

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

Questions 9

Consider the following playbook:

# playbook name: /home/ansible/web.yml

-hosts: webservers become: yes

tasks:

-name: edit file 1

lineinfile:

path: /var/www/content.hml line: "{{ text }}" tags:

-content

-name: edit file 2

lineinfile: path: /var/www/index.hml

line: "{{ text }}"

tags:

-web

-name: edit file 3 lineinfile: path: /var/www/etc.hml line: "{{ text }}" tags: - content - misc

Which use of the ansible-playbook command on the provided playbook will result in ONLY editing the file /var/www/index.html?

A. ansible-playbook /home/ansible/web.yml

B. ansible-playbook /home/ansible/web.yml --skip-tags web

C. ansible-playbook /home/ansible/web.yml --skip-tags content

D. ansible-playbook /home/ansible/web.yml --tags content

Buy Now

Correct Answer: C

This command skips the two tasks editing other files and only allows the task that is editing /var/www/index.html to run.

Questions 10

Which line instructs ansible to install httpd?

A. yum: name=httpd state=installed

B. tasks: install httpd

C. service: name=httpd state=installed

D. name: service=httpd state=installed

Buy Now

Correct Answer: A

The yum module is an appropriate way to install software

Questions 11

State whether the following statement is true or false.

Is this the correct format for an ansible ad-hoc command?

ansible servers -m ping

A. True

B. False

Buy Now

Correct Answer: A

Questions 12

State whether the following statement is true or false.

The command ansible-galaxy init won't create the file structure you need for roles.

A. True

B. False

Buy Now

Correct Answer: B

It will create the correct structure for you.

Questions 13

State whether the following statement is true or false.

The following is allowed in a playbook.

-

tasks:

yaml:

name=yum.

-

hosts: local

A.

True

B.

False

Buy Now

Correct Answer: B

Order is --- - hosts: local must be first.

Exam Code: EX407
Exam Name: Red Hat Certified Specialist in Ansible Automation
Last Update: May 25, 2026
Questions: 124

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2026 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.