0% found this document useful (0 votes)
557 views5 pages

EX407 Demo PDF

This document provides an overview of the Red Hat Certified Specialist in Ansible Automation Exam (EX407) and includes sample questions and solutions. It discusses installing Ansible on a control node, creating users and permissions, configuring Ansible to manage nodes, creating inventory files, using ad-hoc commands to set up yum repositories, and creating a playbook to install packages on different host groups. The document encourages readers to try a free demo of EX407 practice exam software to help prepare for the actual exam.

Uploaded by

Endriu Endriu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
557 views5 pages

EX407 Demo PDF

This document provides an overview of the Red Hat Certified Specialist in Ansible Automation Exam (EX407) and includes sample questions and solutions. It discusses installing Ansible on a control node, creating users and permissions, configuring Ansible to manage nodes, creating inventory files, using ad-hoc commands to set up yum repositories, and creating a playbook to install packages on different host groups. The document encourages readers to try a free demo of EX407 practice exam software to help prepare for the actual exam.

Uploaded by

Endriu Endriu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Questions & Answers PDF Page 1

RedHat
EX407 Exam
Red Hat Certified Specialist in Ansible Automation Exam

Thank you for downloading EX407 exam PDF Demo

You can also try our EX407 practice exam software

Download Free Demo:

www.passitcertify.com/EX407.html

www.passitcertify.com
Questions & Answers PDF Page 2

Version: 4.0
Question: 1

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

www.passitcertify.com
Questions & Answers PDF Page 3

[proxy]
node3 .example.com
[prod]
node4.example.com
node5 .example.com
[webservers:children]
prod

Question: 2

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'

Question: 3

Create a file called packages.yml in /home/sandy/ansible to install some packages for the following
hosts. On dev, prod and webservers install packages httpd, mod_ssl, and mariadb. On dev only install
the development tools package. Also, on dev host update all the packages to the latest.

Solution

Solution as:

www.passitcertify.com
Questions & Answers PDF Page 4

** NOTE 1 a more acceptable answer is likely 'present' since it's not asking to install the latest
state: present
** NOTE 2 need to update the development node
- name: update all packages on development node
      yum:
          name: '*'
          state: latest

www.passitcertify.com
Questions & Answers PDF Page 5

Thank You for trying EX407 PDF Demo

To try our EX407 practice exam software visit link below

http://www.passitcertify.com/EX407.html

Start Your EX407 Preparation


[Limited Time Offer] Use Coupon “20OFF” for extra 20%
discount on the purchase of Practice Test Software. Test your
EX407 preparation with actual exam questions.

www.passitcertify.com

You might also like