[Q70-Q85] Latest RedHat EX407 First Attempt, Exam real Dumps Updated [Aug-2021]

Share

Latest RedHat EX407 First Attempt, Exam real Dumps Updated [Aug-2021]

Get the superior quality EX407 Dumps Questions from Prep4pass. Nobody can stop you from getting to your dreams now. Your bright future is just a click away!

NEW QUESTION 70
What are the minimum configurations that must be made to install Ansible Tower?

  • A. You must provide a target host and set some key user passwords.
  • B. You must specify a few key user passwords.
  • C. PROJECTS_ROOT must be configured.
  • D. You must generate an SSL certificate for the Ansible Tower web frontend.

Answer: C

Explanation:
This is the only required configuration change needed prior to installation.

 

NEW QUESTION 71
Install and configure ansible
Userbobhas 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:
* 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.
* 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 bobuser.
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 groupdev.nodc2 is a member of group test, nodc3 is a member of group nodc4 and node 5 are members of groupprod.Also,prodis a member of group webservers.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
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

 

NEW QUESTION 72
Which of the following are shared between roles on the same system? (Choose all that apply.)

  • A. Tasks
  • B. Handlers
  • C. Templates
  • D. Variables

Answer: B,D

Explanation:
Variables are shared across roles on the same system. This is why namespacing is important. Handlers are shared across roles on the same system.

 

NEW QUESTION 73
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 --tags content
  • B. ansible-playbook /home/ansible/web.yml --skip-tags content
  • C. ansible-playbook /home/ansible/web.yml --skip-tags web
  • D. ansible-playbook /home/ansible/web.yml

Answer: B

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

 

NEW QUESTION 74
Create a file calledadhoc.shin/home/sandy/ansiblewhich will use adhoc commands to set up a new repository. The name of the repo will be 'EPEL' thedescription '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.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
chmod0777adhoc.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'

 

NEW QUESTION 75
Where is Ansible's inventory stored by default?

  • A. etc/ansible/inventory
  • B. ${HOME}/inventory for the currently logged in user
  • C. .etc/ansible/hosts
  • D. /home/ansible/inventory

Answer: C

 

NEW QUESTION 76
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?

  • A. ansible -i inventory Build.yml
  • B. ansible-playbook -i inventory Buildwww.yml
  • C. ansible -i inventory -p Buildwww.yml
  • D. ansible-playbook -i inventory -p Buildwww.yml

Answer: B

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

 

NEW QUESTION 77
If a valid playbook contains serial: 20 and the ansible-playbook command running that playbook is passed '-f 10' and targets an inventory of 15 servers, what is the maximum number of forks will exist at any one time during play execution?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: B

Explanation:
The -f 10 will allow no more that 10 forks to run at once even though serial is set to 20.

 

NEW QUESTION 78
State whether the following statement is true or false.
You can change the no of forks ansible uses from the /etc/ansible/ansible.cfg file.

  • A. True
  • B. False

Answer: A

Explanation:
/etc/ansible/ansible.cfg file is the default location of the configuration file.

 

NEW QUESTION 79
CORRECT TEXT
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 explanation 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 80
Which are of the following are valid uses of a role's meta directory? (Choose all that apply.)

  • A. A role's dependency information.
  • B. Setting variable values for use within a role.
  • C. Setting the allow_duplicates flag.
  • D. Setting the become flag.

Answer: A,C

Explanation:
This is a unique flag that is set in the meta directory to allow a role to be repeated within a play.
Role dependencies may be defined within the meta directory of a role.

 

NEW QUESTION 81
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 is where you define which plays of a role will be used by default.
  • C. The defaults directory stores configurations that override ansible.cfg.
  • 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 82
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/ansible.cfg file and adjust the 'forks' parameter.
  • B. Edit the /etc/ansible/servers file and adjust the 'servers' 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: A

Explanation:
The forks parameter adjust the parallelism of the ansible commands.

 

NEW QUESTION 83
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 84
Which command ships with Ansible and provides module documentation on your system?

  • A. ansible-module-doc
  • B. ansible-help
  • C. ansible-doc
  • D. ansible-documentation

Answer: C

Explanation:
The ansible-doc command provides documentation on ansible modules.

 

NEW QUESTION 85
......

RedHat Practice Test Engine with EX407 Questions: https://drive.google.com/open?id=1z-6eIpznSsu75X5cfIjv-Q5Xj_teOgUB

Guaranteed Success with Valid RedHat EX407 Dumps: https://www.prep4pass.com/EX407_exam-braindumps.html