Download RedHat.EX407.VCEplus.2020-11-24.101q.vcex

Download Exam

File Info

Exam Red Hat Certified Specialist in Ansible Automation
Number EX407
File Name RedHat.EX407.VCEplus.2020-11-24.101q.vcex
Size 76 KB
Posted Nov 24, 2020
Download RedHat.EX407.VCEplus.2020-11-24.101q.vcex

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase

Coupon: MASTEREXAM
With discount: 20%






Demo Questions

Question 1

Examine the following inventory excerpt file named /home/user/ansible/inventory. [dbservers] db1.example.com
Which of the following files does Ansible check for variables related to that inventory? (Choose all that apply.)


  1. /home/user/ansible/dbservers
  2. /home/user/ansible/host_vars/db1.example.com
  3. /home/user/ansible/host_vars/db1
  4. /home/user/ansible/group_vars/dbservers
Correct answer: BD
Explanation:
Ansible will check in /home/user/ansible/host_vars to find files named after hosts defined in the inventory. Ansible will check this file because there is a group defined in the inventory as dbservers.
Ansible will check in /home/user/ansible/host_vars to find files named after hosts defined in the inventory. Ansible will check this file because there is a group defined in the inventory as dbservers.



Question 2

Which flags must be accepted as input for a dynamic inventory script?


  1. Only --list
  2. --host [hostname] and --list
  3. --host [hostname] and --inv-list
  4. --list and --format [file format]
Correct answer: B



Question 3

A dynamic inventory must return data in what format?


  1. JSON
  2. XML
  3. YAML
  4. INI
Correct answer: A
Explanation:
Dynamic inventories must return JSON output.
Dynamic inventories must return JSON output.



Question 4

Which is the default inventory file used by Ansible?


  1. ${PWD}/.inventory
  2. /etc/hosts
  3. /etc/ansible/inventory
  4. /etc/ansible/hosts
Correct answer: D
Explanation:
Ansbile refers to /etc/ansible/hosts as the default inventory.
Ansbile refers to /etc/ansible/hosts as the default inventory.



Question 5

Observe the details of the following dynamic inventory file. $ ls -l dynamic.py -rw-rw-r--. 1 user user 1928 Mar 30 08:21 dynamic.py
Why will this inventory file cause the ansible command to fail?


  1. Ansible cannot use python scripts as inventories.
  2. The ansible user must own the file.
  3. The file is not executable.
  4. The ansible command will not fail using the noted file with the given details.
Correct answer: C
Explanation:
Without being executable. Ansible will attempt to parse the script as a static inventory and fail.
Without being executable. Ansible will attempt to parse the script as a static inventory and fail.



Question 6

Is it possible to specify multiple inventory files at once?


  1. Yes, you specify your inventory as a directory containing valid inventory files.
  2. No.
  3. Yes, you must provide extra parameters to the -i flag.
  4. Yes, you must specify a reference inventory master file.
Correct answer: A



Question 7

What keyword stores a command's output into a variable?


  1. register
  2. output
  3. output is stored in a variable named results by default
  4. debug
Correct answer: A
Explanation:
The register keyword will store output from the preceding command into a provided variable.
The register keyword will store output from the preceding command into a provided variable.



Question 8

What does the lineinfile module do?


  1. Allow addition of lines anywhere in a file 
  2. Allows to grep for lines in a provided file 
  3. Allow additions of lines to the end of a file only
  4. Input data into a file from stdin
Correct answer: A
Explanation:
The purpose of the lineinfile module is to add lines anywhere in a file passed on a pattern.
The purpose of the lineinfile module is to add lines anywhere in a file passed on a pattern.



Question 9

Consider the following playbook.
--- hosts: local become: yes
tasks: - name: create users 
user: name: "{{item}}" with_items:
- sam
- john- bob
How many times is the user module invoked?


  1. 1
  2. 0
Correct answer: B
Explanation:
The call count will be based on the number of times the with_items loop executes - which is 3 in this case
The call count will be based on the number of times the with_items loop executes - which is 3 in this case



Question 10

What command is used to run a playbook?


  1. ansible-playbook <playbook>
  2. ansible <playbook>
  3. ansible-p <playbook>
  4. playbook <playbook>
Correct answer: A
Explanation:
This command will run a given playbook successfully.
This command will run a given playbook successfully.









CONNECT US

Facebook

Twitter

PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount!



HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files