Real EX407 Exam PDF Test Engine Practice Test Questions
RedHat EX407 Real 2023 Braindumps Mock Exam Dumps
RedHat EX407 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
| Topic 8 |
|
| Topic 9 |
|
| Topic 10 |
|
| Topic 11 |
|
How much EX407 Exam Cost
The price of the Red Hat EX407 exam is $400 USD.
NEW QUESTION 24
===================================================================================
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.
Rekey an existing Ansible vault as follows:
-----------------------------------------------
* Download Ansible vault from http:// classroom.example.com /secret.yml to /home/
admin/ansible/
* The current vault password is curabete
* The new vault password is newvare
* The vault remains in an encrypted state with the new password
Answer:
Explanation:
Solution as:
# pwd
/home/admin/ansible/
# wget http://classroom.example.com/secret.yml
# chmod 0600 newpassword.txt
# ansible-vault rekey vault.yml --new-vault-password-file=newpassword.txt
NEW QUESTION 25
Create a file called requirements.yml in /home/sandy/ansible/roles to install two roles. The source for the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second php-role. The roles should be installed in /home/sandy/ansible/roles.
Answer:
Explanation:
in /home/sandy/ansible/roles
vim requirements.yml
Run the requirements file from the roles directory:
ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles
NEW QUESTION 26
===================================================================================
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
Answer:
Explanation:
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
NEW QUESTION 27
===================================================================================
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.
Generate a hosts file:
* Download an initial template file hosts.j2 from http://classroom.example.com/
hosts.j2 to
/home/admin/ansible/ Complete the template so that it can be used to generate a file
with a
line for each inventory host in the same format as /etc/hosts:
172.25.250.9 workstation.lab.example.com workstation
* Create a playbook called gen_hosts.yml that uses this template to generate the file
/etc/myhosts on hosts in the dev host group.
* When completed, the file /etc/myhosts on hosts in the dev host group should have a
line for
each managed host:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.25.250.10 serevra.lab.example.com servera
172.25.250.11 serevrb.lab.example.com serverb
172.25.250.12 serevrc.lab.example.com serverc
172.25.250.13 serevrd.lab.example.com serverd
-----------------------------------------------------------------
while practising you to create these file hear. But in exam have to download as per
questation.
hosts.j2 file consists.
localhost localhost.localdomain localhost4 localhost4.localdomain4
::1
localhost localhost.localdomain localhost6 localhost6.localdomain6
-------------------------------------------------------------------
Answer:
Explanation:
Solution as:
# pwd
/home/admin/ansible
# wget http://classroom.example.com/hosts.j2
# vim hosts.j2
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1
localhost localhost.localdomain localhost6 localhost6.localdomain6
{% for host in groups['all'] %}
{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] }} {{ hostvars[host]
['ansible_facts']['fqdn'] }} {{ hostvars[host]['ansible_facts']['hostname'] }}
{% endfor %}
:wq!
# vim gen_hosts.yml
---
- name: collecting all host information
hosts: all
tasks:
- name:
template:
src: hosts.j2
dest: /etc/myhosts
when: inventory_hostname in groups['dev']
:wq
# ansible-playbook gen_hosts.yml --syntax-check
# ansible-playbook gen_hosts.yml
NEW QUESTION 28
What is the defaults directory used for within a role?
- A. The defaults directory is for defining variable values that override other variables used in a playbook using the role.
- B. The defaults directory stores configurations that override ansible.cfg.
- C. The defaults directory is where you define which plays of a role will be used by default.
- D. The defaults directory is for defining default values for variables if no other value is provided.
Answer: D
Explanation:
Variables defined within defaults are given the lowest precedence and are only used when no other value is provided.
NEW QUESTION 29
You are taking over for someone while they are away on leave. You need to run a playbook against over
600 servers. When you run the playbook you notice that only 10 servers are worked on at any one time.
How would you fix this so that you can have 50 servers worked on at the same time?
- A. Edit the /etc/ansible/servers file and adjust the 'servers' parameter.
- B. Edit the /etc/ansible/ansible.cfg file and adjust the 'forks' parameter.
- C. Edit the /etc/ansible/hosts file and adjust the 'forks' parameter.
- D. Edit the /etc/ansible/ansible.cfg file and adjust the 'poll_interval' parameter.
Answer: B
Explanation:
The forks parameter adjust the parallelism of the ansible commands.
NEW QUESTION 30
What formats may variables specified on the command line use when not using a file with the -e flag?
(Choose all that apply.)
- A. YAML
- B. Ansible dictionary
- C. JSON
- D. CSV
Answer: A,C
Explanation:
Variables must be specified in JSON format when passed via command line.
NEW QUESTION 31
In what format are ansible playbooks written?
- A. XML
- B. YAML
- C. Ansible Proprietary Format (APF)
- D. JSON
Answer: B
NEW QUESTION 32
Create the users in the file usersjist.yml file provided. Do this in a playbook called users.yml located at
/home/sandy/ansible. The passwords for these users should be set using the lock.yml file from TASK7. When running the playbook, the lock.yml file should be unlocked with secret.txt file from TASK 7.
All users with the job of 'developer' should be created on the dev hosts, add them to the group devops, their password should be set using the pw_dev variable. Likewise create users with the job of 'manager' on the proxy host and add the users to the group 'managers', their password should be set using the pw_mgr variable.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
ansible-playbook users.yml -vault-password-file=secret.txt
NEW QUESTION 33
Using the Simulation Program, perform the following tasks:
Static Inventories Task:
1. Add a new group to your default ansible host file. call the group [ec2]
2. Add a new host to the new group you created.
3. Add a variable to a new host entry in the /etc/ansible/hosts file. Add the following. localhost http_port=80 maxRequestsPerChild=808
4. Check to see if maxRequestsPerChild is pulled out with an ad-hoc command.
5. Create a local host file and put a target group and then a host into it. Then ping it with an ad-hoc command.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
1. Edit the /etc/ansible/hosts file. Add a group.
2. Edit the /etc/ansible/hosts file. Add a user under the group you created.
3. Edit the /etc/ansible/hosts file. Find a host. if we add a variable called maxRequestsPerChild to the host it would look like this. host1 maxRequestsPerChild=808
4. ansible ec2 -m shell -a "echo {{ maxRequestsPerChild }}"
5. Edit a local file. It could be called anything. Lets call it myhosts. Inside the file it would have a host like the following. [mygroup] myusername1.mylabserver.com
NEW QUESTION 34
Which of the following are valid parameters of the template module? (Choose all that apply.)
- A. state
- B. validate
- C. .name
- D. dest
Answer: B,D
Explanation:
The validate parameter sets a program to check file syntax prior to deployment.
NEW QUESTION 35
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.
Answer:
Explanation:
Solution as:
** 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
NEW QUESTION 36
State whether the following statement is true or false.
The correct structure for use with roles has the various portions of the role under a central folder.
E.g. if the role is called apache then the location of the tasks would be the following:
apache - tasks - main.yml
- A. True
- B. False
Answer: A
Explanation:
This is the format for the file system used for roles:
project/
defaults
main.yml
files
handlers
main.yml
meta
main.yml
README.md
tasks
main.yml
templates
tests
inventory
test.yml
vars
main.yml
NEW QUESTION 37
Create a file in /home/sandy/ansible/ called report.yml. Using this playbook, get a file called report.txt (make it look exactly as below). Copy this file over to all remote hosts at /root/report.txt. Then edit the lines in the file to provide the real information of the hosts. If a disk does not exist then write NONE.
Answer:
Explanation:
Solution as:

NEW QUESTION 38
Create a file in/home/sandy/ansible/calledreport.yml.Using this playbook, get a filecalledreport.txt(make it look exactly as below). Copy this file over to all remote hosts at/root/report.txt.Then edit the lines in the file to provide the real informationofthehosts. Ifa disk does not exist then write NONE.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:

NEW QUESTION 39
Create a playbook called regulartasks.yml which has the system that append the date to /root/datefile every day at noon. Name is job 'datejob'
Answer:
Explanation:
See the Explanation for completeSolution below.
Explanation
Solution as:
NEW QUESTION 40
......
The benefit in Obtaining the EX407 Exam Certification
- Red Hat Certified Specialist in Ansible Automation Certification is distinguished among competitors. Red Hat Certified Specialist in Ansible Automation certification can give them an edge at that time easily when candidates appear for a job interview, employers seek to notify something which differentiates the individual to another.
- Red Hat Certified Specialist in Ansible Automation Certification provides practical experience to candidates from all the aspects to be a proficient worker in the organization.
- Red Hat Certified Specialist in Ansible Automation have the knowledge to use the tools to complete the task efficiently and cost-effectively than the other non-certified professionals lack in doing so.
- Red Hat Certified Specialist in Ansible Automation certification has more useful and relevant networks that help them in setting career goals for themselves. Red Hat Certified Specialist in Ansible Automation networks provide them with the right career direction than non certified usually are unable to get.
- Red Hat Certified Specialist in Ansible Automation Certifications provide opportunities to get a job easily in which they are interested in instead of wasting years and ending without getting any experience.
Prepare For The EX407 Question Papers In Advance: https://www.vcetorrent.com/EX407-valid-vce-torrent.html
Released RedHat EX407 Updated Questions PDF: https://drive.google.com/open?id=1y_M7AhkT6006FEooGdSCH1SZQl7lEOM7