0% found this document useful (0 votes)
375 views2 pages

Ansible Automation Coral

This document contains 15 multiple choice questions about Ansible concepts like roles, variables, facts, handlers, vaults, and skipping facts. It tests knowledge of using ansible-galaxy to view role info, defining variables on the command line with --extra-vars, accessing complex variables, valid file extensions for inventory variables, and using hostvars to access variables from another host. The correct answers are provided.

Uploaded by

Ankur Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
375 views2 pages

Ansible Automation Coral

This document contains 15 multiple choice questions about Ansible concepts like roles, variables, facts, handlers, vaults, and skipping facts. It tests knowledge of using ansible-galaxy to view role info, defining variables on the command line with --extra-vars, accessing complex variables, valid file extensions for inventory variables, and using hostvars to access variables from another host. The correct answers are provided.

Uploaded by

Ankur Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. You can view the details of a role using which of the following?

Ans : ansible-galaxy info username.role -- Correct

2. Which option will give you an error while accessing your complex variable?
a){{ ansible_eth0['ipv4']['address'] }}
b){{ ansible_eth0["ipv4"]["address"] }}
c){{ ansible_eth0.ipv4.address }}
d){{ ansible_eth0[ipv4][address] }} --Correct

3. The following are valid file extensions to store inventory variables in a file,
except ________
a).yml
b).ini
c)No file extension
d).json
Ans: .yml --wrong

4. Fact variables have higher precedence than Playbook variables.


False True
Ans: False--Correct

5. How do you define variables in the Command Line Interface while executing
playbook?
a)--variables-
b)--vars-extra
c)--extra-vars
d)None of the options
Ans: c)--extra-vars --Correct

6. Defining the same variable in multiple locations will cause error.


Ans: False--Correct

7. Which of the following can you include in your Playbook?


a)All the options
b)Role
c)Playbook
d)Task
Ans: a)All the options --Correct

8. Which of the following can you use to delete your installed role?
a)destroy
b)remove
c)delete
d)omit
Ans: b)Remove --Correct

9. You can run non-tagged tasks using which magical word?


a)untag
b)tagless
c)None of the options
d)nontag
Ans: c)None of the options --Correct

10. How to access variables defined in a host from another host?


a)inventory_hostname
b)groups
c)hostvars
d)None of the options
Ans: c)hostvars --Correct

This study source was downloaded by 100000797727937 from CourseHero.com on 04-01-2023 06:47:03 GMT -05:00

https://www.coursehero.com/file/59704602/Ansible-Automation-Coraltxt/
11. This allows you to keep secret data in Playbook.
a)Ansible-galaxy
b)Ansible-playbook
c)None of the options
d)Ansible-vault
Ans: d)Ansible-vault --Correct

12. You can skip the task of gathering facts through which of the following ways?
Ans: gather_facts: no --Correct

13. Default variables in Roles have the least precedence.


Ans: True --Correct

14. You can contribute your roles to the Ansible community through GitHub Profile.
a)False
b)True
Ans: b) True --Correct

A handler will run only once after all the tasks are completed in a particular
play.
a) False
b)True
Ans: b)True --Correct

This study source was downloaded by 100000797727937 from CourseHero.com on 04-01-2023 06:47:03 GMT -05:00

https://www.coursehero.com/file/59704602/Ansible-Automation-Coraltxt/
Powered by TCPDF (www.tcpdf.org)

You might also like