[Q73-Q94] Certification Training for EX407 Exam Dumps Test Engine [2021]

Share

Certification Training for EX407 Exam Dumps Test Engine [2021]

Sep 19, 2021 Step by Step Guide to Prepare for EX407 Exam

NEW QUESTION 73
State whether the following statement is true or false.
A template has a maximum of 10 variables.

  • A. False
  • B. True

Answer: A

Explanation:
The No is much higher.

 

NEW QUESTION 74
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 75
Is there a syntax error in the following excerpt? If so, what is it?
vars:
package: httpd
tasks:
- name: Deploy {{ package }}
yum:
name:
{{ package }}
state: present

  • A. No, there are no syntax errors in the provided excerpt.
  • B. Yes, the name parameter for the yum module should have a quoted value.
  • C. Yes, the name keyword (below tasks) should have a quoted value.
  • D. Yes, the variable package is not defined correctly.

Answer: B

Explanation:
Whenever a variable leads a value, it must be quoted to avoid parse errors.

 

NEW QUESTION 76
Create a playbookthatchanges the default target on tarqet. Do this in playbook file called target.yml in/home/sandy/ansible

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
- name: change default target
hosts: all
tasks:
- name: change target
file:
src: /usr/lib/systemd/system/multi-user.target dest:/etc/systemd/system/default.target state: link

 

NEW QUESTION 77
What is the primary difference between the shell and command module?

  • A. The shell module sets up a shell environment and the command module only runs the provided command.
  • B. The shell module is for executing shell commands, and the command module is for Ansible internal commands.
  • C. There is no difference.
  • D. The shell module sets a default shell whereas the command module executes a shell command.

Answer: A

 

NEW QUESTION 78
Which of the following are valid flags for the ansible-playbook command? (Choose all that apply.)

  • A. --tags
  • B. --include-tags
  • C. --tag
  • D. --skip-tags

Answer: A,D

Explanation:
The --skip-tags flag allows specification of tags to identify specific plays for Ansible to skip.

 

NEW QUESTION 79
CORRECT TEXT
Using the Simulation Program, perform the following tasks:
Ad-Hoc Ansible Commands (Number Two) Task:
1. Use the ad-hoc command to make sure php is installed.
2. Use the ad-hoc command to make sure that php is installed and is the latest version.
3. Use the ad-hoc command to make sure that httpd is installed.
4. Use the ad-hoc command to remove httpd from the servers.

Answer:

Explanation:
See explanation below.
Explanation:
1. ansible all -b -m yum -a 'name=php state=present'
2. ansible all -b -m yum -a 'name=php state=latest'
3. ansible all -b -m yum -a 'name=httpd state=latest'
4. ansible all -b -m yum -a 'name=httpd state=absent'

 

NEW QUESTION 80
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 complete Solution below.
Explanation
Solution as:

 

NEW QUESTION 81
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:
See the Explanation for complete Solution below.
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 82
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 83
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 84
State whether the following statement is true or false.
Will this command use servers in a local inventory called invent.local?
ansible all -m ping -i invent.local

  • A. True
  • B. False

Answer: A

 

NEW QUESTION 85
Create a file calledrequirements.ymlin/home/sandy/ansible/rolesto 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:
See the Explanation for complete Solution below.
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 86
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. False
  • B. True

Answer: A

Explanation:
It will create the correct structure for you.

 

NEW QUESTION 87
Which command will allow you to collect all facts for the specific host group 'labmachines'?

  • A. ansible-gather-facts labmachines
  • B. ansible -c setup labmachines
  • C. ansible labmachines -m facts
  • D. ansible labmachines -m setup

Answer: D

Explanation:
This command specifies the correct inventory and uses the setup module which gathers facts for target hosts.

 

NEW QUESTION 88
What does the when keyword do?

  • A. Allows a play to be scheduled
  • B. Allows a task to be conditional
  • C. There is no when keyword
  • D. Allows a play to be conditional

Answer: B

 

NEW QUESTION 89
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 90
Create a file calledrequirements.ymlin/home/sandy/ansible/rolesa file calledrole.yml in
/home/sandy/ansible/.Thehaproxy-roleshould be used on theproxyhost. And when you curl
http://node3.example.comit should display "Welcome tonode4.example.com" and when you curl again
"Welcome tonode5.example.com"Thephp-roleshould be used on theprodhost.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:

Check the proxy host by curlhttp://node3.example.com

 

NEW QUESTION 91
How are facts collected? (Choose all that apply.)

  • A. The Ansible control node periodically polls the hosts in the inventory.
  • B. During playbook execution.
  • C. Ansible agents push facts to the control node.
  • D. The setup module.

Answer: B,D

Explanation:
The setup module collects facts.

 

NEW QUESTION 92
State whether the following statement is true or false.
Ansible tower can be used to manage your ansible systems.

  • A. True
  • B. False

Answer: A

 

NEW QUESTION 93
Create an ansible vault password file called lock.yml with the password reallysafepw in the
/home/sandy/ansible directory. In the lock.yml file define two variables. One is pw_dev and the password is
'dev' and the other is pw_mgr and the password is 'mgr' Create a regular file called secret.txt which contains the password for lock.yml.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
ansible-vault create lock.yml
New Vault Password: reallysafepw
Confirm: reallysafepw

 

NEW QUESTION 94
......

Ultimate Guide to Prepare EX407 Certification Exam for Red Hat Certified Specialist: https://www.fast2test.com/EX407-premium-file.html

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어