Tested & Approved EX407 Study Materials Download Free Updated 42 Questions [Q10-Q31]

Share

Tested & Approved EX407 Study Materials Download Free Updated 42 Questions

Regular Free Updates EX407 Dumps Real Exam Questions Test Engine


Red Hat Certified Specialist in Ansible Automation EX407 Exam

Red Hat Certified Specialist in Ansible Automation EX407 Exam which is related to Red Hat Certified Specialist in Ansible Automation Certification. This exam validates the Candidate ability to use Ansible to automate the configuration of systems and applications. It also deals with the ability to Install, configure an Ansible control node, configure Ansible managed nodes and create simple shell scripts that run ad hoc Ansible commands.

 

NEW QUESTION 10
What keyword sets a change condition for a given task?

  • A. changed_when
  • B. change_set
  • C. flag_change
  • D. register_change

Answer: D

 

NEW QUESTION 11
Create anansible vault password file called reallysafepwin the/home/sandy/ansible directory. In the lock.yml file define two variables. One is and the password is 'dev' and the other is pw_mgrand the password is 'mgr' Create a regular file called 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 12
Where can you find documentation on Ansible modules? (Choose all that apply.)

  • A. The Ansible man page.
  • B. Ansible online documentation.
  • C. The Ansible-Module man page.
  • D. Using the ansible-doc command.

Answer: B,D

Explanation:
The ansible-doc command is designed to provide module documentation. Module documentation may be found online.

 

NEW QUESTION 13
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 14
What file should you look at first when installing tower?

  • A. README.md
  • B. inventory
  • C. setup.sh
  • D. /etc/tower/settings.py

Answer: A

 

NEW QUESTION 15
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 'poll_interval' parameter.
  • B. Edit the /etc/ansible/ansible.cfg file and adjust the 'forks' parameter.
  • C. Edit the /etc/ansible/servers file and adjust the 'servers' parameter.
  • D. Edit the /etc/ansible/hosts file and adjust the 'forks' parameter.

Answer: B

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

 

NEW QUESTION 16
State whether the following statement is true or false.
The following command can be used to filter facts to pull out the ip address for the target host.
ansible local -m setup -a "filter=ansible_default_ipv4"

  • A. False
  • B. True

Answer: B

 

NEW QUESTION 17
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.

Answer:

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

 

NEW QUESTION 18
What is wrong with the following command:
ansible all -a "mkdir/tmp/testfile"

  • A. There is not a module specified.
  • B. The -b flag is required.
  • C. The command will execute without error.
  • D. There is not an inventory file specified.

Answer: C

Explanation:
This command will execute using the command module by default.

 

NEW QUESTION 19
Create a role called sample-apache and store it in /home/bob/ansible/roles. The role should satisfy the following requirements:
*In the role, install and enable httpd. Also enable the firewall to allow http. Also run the template
*index.html.j2 and make sure this runs Create a template index.html.j2 that displays "Welcome to the server HOSTNAME" In a play called apache.yml in /home/bob/ansible/ run the sample-apache role.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
/home/sandy/ansible/apache.yml

/home/sandy/ansible/roles/sample-apache/tasks/main.yml

/home/sandy/ansible/roles/sample-apache/templates/index.html.j2

In /home/sandy/ansible/roles/sample-apache/handlers/main.yml

 

NEW QUESTION 20
Install and configure ansible
User sandy has been created on your control node with the appropriate permissions already, do not change or modify ssh keys. Install the necessary packages to run ansible on the control node. Configure ansible.cfg to be in folder /home/sandy/ansible/ansible.cfg and configure to access remote machines via the sandy user. All roles should be in the path /home/sandy/ansible/roles. The inventory path should be in /home/sandy/ansible/invenlory.
You will have access to 5 nodes.
node1.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
Configure these nodes to be in an inventory file where node I is a member of group dev. nodc2 is a member of group test, node3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.

Answer:

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 21
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 22
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. False
  • B. True

Answer: B

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

 

NEW QUESTION 23
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 24
Which of the following attributes specifies how a handler can be notified? (Choose all that apply.)

  • A. name
  • B. handle
  • C. listen
  • D. service

Answer: A,C

Explanation:
While using the handler's name attribute is not encouraged, it does work.

 

NEW QUESTION 25
State whether the following statement is true or false.
There is a 10 user trial available.

  • A. False
  • B. True

Answer: B

Explanation:
Explanation/Reference:

 

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

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

Answer: A

 

NEW QUESTION 27
In /home/sandy/ansible/ create a playbook called logvol.yml. In the play create a logical volume called Iv0 and make it of size 1500MiB on volume group vgO If there is not enough space in the volume group print a message "Not enough space for logical volume" and then make a 800MiB Iv0 instead. If the volume group still doesn't exist, create a message "Volume group doesn't exist" Create an xfs filesystem on all Iv0 logical volumes. Don't mount the logical volume.

Answer:

Explanation:
Solution as:

 

NEW QUESTION 28
Create a role called sample-apache in /home/sandy/ansible/roles that enables and starts httpd, enables and starts the firewall and allows the webserver service. Create a template called index.html.j2 which creates and serves a message from /var/www/html/index.html Whenever the content of the file changes, restart the webserver service.
Welcome to [FQDN] on [IP]
Replace the FQDN with the fully qualified domain name and IP with the ip address of the node using ansible facts. Lastly, create a playbook in /home/sandy/ansible/ called apache.yml and use the role to serve the index file on webserver hosts.

Answer:

Explanation:
See the Explanation for complete Solution below.
Explanation
/home/sandy/ansible/apache.yml

/home/sandy/ansible/roles/sample-apache/tasks/main.yml

/home/sandy/ansible/roles/sample-apache/templates/index.html.j2

In /home/sandy/ansible/roles/sample-apache/handlers/main.yml

 

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

Answer: A

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 30
What values will serial accept? (Choose all that apply.)

  • A. A mix of integer and appropriately specified percentage values
  • B. Symbolic percentage values (as in 50%)
  • C. Integer values
  • D. Decimal percentage values (as in .50)

Answer: A,B,C

Explanation:
As long as the percentage values are in the correct format (symbolic), serial can handle mixing and matching the values. Serial will take integer values.

 

NEW QUESTION 31
......

Pass RedHat EX407 Exam in First Attempt Easily: https://www.vcedumps.com/EX407-examcollection.html

Practice Test Questions Verified Answers As Experienced in the Actual Test!: https://drive.google.com/open?id=1AYVhcr7AFucyhQE73rDRW8AZTTKe9LCR