Real EX407 are Uploaded by BraindumpQuiz provide 2021 Latest EX407 Practice Tests Dumps.
All EX407 Dumps and Red Hat Certified Specialist in Ansible Automation exam Training Courses Help candidates to study and pass the Red Hat Certified Specialist in Ansible Automation exam Exams hassle-free!
NEW QUESTION 11
Which flags must be accepted as input for a dynamic inventory script?
- A. --host [hostname] and --list
- B. Only --list
- C. --host [hostname] and --inv-list
- D. --list and --format [file format]
Answer: A
NEW QUESTION 12
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 13
Create a jinja template in /home/sandy/ansible/ and name it hosts.j2. Edit this file so it looks like the one below. The order of the nodes doesn't matter. Then create a playbook in /home/sandy/ansible called hosts.yml and install the template on dev node at /root/myhosts
Answer:
Explanation:
See the Explanation for complete Solution below.
Explanation
Solution as:
NEW QUESTION 14
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 15
What is the url for the official Ansible online documentation?
- A. help.ansible.com
- B. google.com
- C. ansiblehelp.com
- D. docs.ansible.com
Answer: D
NEW QUESTION 16
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 17
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 18
What character is used to denote use of a jinja filter on an Ansible variable?
- A. The period: "."
- B. The pipe: "|"
- C. The percent sign: "%"
- D. The at symbol: "@"
Answer: B
NEW QUESTION 19
What does the lineinfile module do?
- A. Allow additions of lines to the end of a file only
- B. Input data into a file from stdin
- C. Allow addition of lines anywhere in a file
- D. Allows to grep for lines in a provided file
Answer: C
Explanation:
The purpose of the lineinfile module is to add lines anywhere in a file passed on a pattern.
NEW QUESTION 20
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 21
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 22
State whether the following statement is true or false.
The following is allowed in a playbook.
---
-
tasks:
yaml:
name=yum.
- hosts: local
- A. False
- B. True
Answer: A
Explanation:
Order is --- - hosts: local must be first.
NEW QUESTION 23
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 24
What command is used to run a playbook?
- A. ansible-playbook <playbook>
- B. playbook <playbook>
- C. ansible <playbook>
- D. ansible-p <playbook>
Answer: A
Explanation:
This command will run a given playbook successfully.
NEW QUESTION 25
By default, how many times can a role be applied during a play?
- A. Once, presuming it is only applied with a single set of parameters.
- B. As many times as necessary, presuming the 'single_run' attribute is set to false.
- C. Once, no matter the parameters provided.
- D. As many times as necessary, no matter the parameters.
Answer: A
Explanation:
A role given only a single set of parameters will only be applied by Ansible one time in a play.
NEW QUESTION 26
Where are custom facts defined on a host?
- A. /etc/ansible/facts.db
- B. /etc/ansible/facts.d/*.fact
- C. /etc/ansible/<HOST>/*.fact
- D. /etc/ansible/facts.d/<HOSTNAME>
Answer: B
Explanation:
Custom facts are gathered from all files with the .fact extension in /etc/ansible/facts.d.
NEW QUESTION 27
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 28
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 29
Templates must be written in what language?
- A. Jinja2
- B. XML
- C. Ruby
- D. INI
Answer: A
Explanation:
Templates are parsed using the Jinja2 templating language.
NEW QUESTION 30
What is a typical use case for an Ansible Template?
- A. Defining a host group
- B. Running remote commands
- C. Installing remote Ansible installations
- D. Managing remote system configuration files
Answer: D
NEW QUESTION 31
Which of the following is a configuration file for Ansible Tower?
- A. /etc/ansible/tower.ini
- B. /etc//tower/settings.py
- C. /etc/ansible/tower.py
- D. /etc//tower/settings.ini
Answer: B
Explanation:
This file contains tower settings that may be adjusted.
NEW QUESTION 32
......
Valid Way To Pass RedHat's EX407 Exam with : https://www.braindumpquiz.com/EX407-exam-material.html
Free Test Engine For Red Hat Certified Specialist in Ansible Automation exam Certification Exams: https://drive.google.com/open?id=1g58ZvWAlGzoRZRPXdgvP1J2fDvr7knvx