[Sep-2021] Dumps Brief Outline Of The EX407 Exam - TestSimulate
EX407 Training & Certification Get Latest Red Hat Certified Specialist
NEW QUESTION 26
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 27
State whether the following statement is true or false.
Ansible expects templates to use json format.
- A. False
- B. True
Answer: A
Explanation:
They don't use json format.
NEW QUESTION 28
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 29
Which of the following are valid parameters of the template module? (Choose all that apply.)
- A. dest
- B. .name
- C. validate
- D. state
Answer: A,C
Explanation:
The validate parameter sets a program to check file syntax prior to deployment.
NEW QUESTION 30
Create an empty encrypted file calledmyvault.yml in /home/sandy/ansibleand set the passwordtonotsafepw.
Rekey the passwordtoiwejfj2221.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
ansible-vault create myvault.yml
Create new password: notsafepw Confirm password: notsafepwansible-vault rekeymyvault.yml Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221
NEW QUESTION 31
Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write "Development" If host is a member oftestthen write "Test" If host is a member ofprodthen write "Production"
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:
NEW QUESTION 32
Using the Simulation Program, perform the following tasks:
1. Use an ansible ad-hoc command, check the connectivity of your servers.
2. Use an ad-hoc ansible command, find the free space of your servers.
3. Use an ad-hoc ansible command, find out the memory usage of your servers.
4. Do an ls -l on the targets /var/log/messages file.
5. Tail the contents of the targets /var/log/messages file.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
1. ansible all -m ping
2. ansible all -a "/bin/df -h"
3. ansible all -a "/usr/bin/free"
4. ansible all -a "ls -l /var/log/messages"
5. ansible local -b -a "tail /var/log/messages"
NEW QUESTION 33
Which subcommand of ansible-galaxy makes a role available for use from galaxy?
- A. pull
- B. create
- C. init
- D. install
Answer: D
Explanation:
The install subcommand will pull a role from galaxy and make it ready for use on your local system.
NEW QUESTION 34
What keyword stores a command's output into a variable?
- A. debug
- B. register
- C. output is stored in a variable named results by default
- D. output
Answer: B
Explanation:
The register keyword will store output from the preceding command into a provided variable.
NEW QUESTION 35
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 36
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 37
Create a file called packages.yml in/home/sandy/ansibleto install somepackages 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:
See the Explanation forcomplete Solution below.
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 developmentnode
yum:
name: '*'
state: latest
NEW QUESTION 38
Create a playbook called timesvnc.yml in /home/sandy/ansible using rhel system role timesync. Set the time to use currently configured nip with the server 0.uk.pool.ntp.org. Enable burst. Do this on all hosts.
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
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 41
In /home/sandy/ansible/create a playbook called the play create a logical volume calledIv0and make it of size 1500MiB on volume group If there is not enough space in the volume groupprinta message
"Not enough space for logical volume" instead. If the volume group still doesn't exist, create a message"Volume group doesn't exist" filesystem on allIv0logical volumes. Don't mount the logical volume.
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:
NEW QUESTION 42
What Ansible variable allows access to internal Ansible data?
- A. Environment Variables
- B. Dictionary Variables
- C. Magic Variables
- D. Ansible Facts
Answer: C
Explanation:
Magic variables allow access to internal Ansible data such as host groups and inventory hosts.
NEW QUESTION 43
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 44
State whether the following statement is true or false.
There is a 10 user trial available.
- A. True
- B. False
Answer: A
Explanation:
Explanation/Reference:
NEW QUESTION 45
Which keywords are valid? (Choose all that apply.)
- A. never
- B. rescue
- C. always
- D. block
Answer: B,C,D
Explanation:
Always is a valid keyword that is part of the block group error handling set of keywords.
Block is a valid keyword that is part of the block group error handling set of keywords.
NEW QUESTION 46
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 47
Create a playbook that changes the default target on all nodes to multi-user 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 48
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. JSON
- C. CSV
- D. Ansible dictionary
Answer: A,B
Explanation:
Variables must be specified in JSON format when passed via command line.
NEW QUESTION 49
Which of the following are valid ways to populate an Ansible Tower project with your source files? (Choose all that apply.)
- A. git
- B. file system of the Ansible Tower server
- C. tar upload
- D. subversion
Answer: A,B,D
Explanation:
Ansible Tower is able to work with subversion repositories for artifact management. Ansible Tower labels this as a manual project. Ansible Tower is capable of pulling artifacts from a git repository by branch.
NEW QUESTION 50
......
Certification Training for EX407 Exam Dumps Test Engine: https://www.testsimulate.com/EX407-study-materials.html