Reader small image

You're reading from  Mastering Ansible, 4th Edition - Fourth Edition

Product typeBook
Published inDec 2021
PublisherPackt
ISBN-139781801818780
Edition4th Edition
Right arrow
Authors (2):
James Freeman
James Freeman
author image
James Freeman

James Freeman is an accomplished IT professional with over 25 years' experience in the technology industry. He has more than a decade of first-hand experience in solving real-world enterprise problems in production environments using Ansible, open source, and AWS. As part of this work, he frequently introduces Ansible as a new technology to businesses and CTOs for the first time. In addition, he has co-authored five books and one video training course on Ansible, facilitated bespoke Ansible workshops and training sessions, and presented at both international conferences and meetups on Ansible.
Read more about James Freeman

Jesse Keating
Jesse Keating
author image
Jesse Keating

Jesse Keating is an accomplished Ansible user, contributor, and presenter. He has been an active member of the Linux and open source community for over 15 years. He has firsthand experience involving a variety of IT activities, software development, and large-scale system administration. He has presented at numerous conferences and meetups, and has written many articles on a variety of topics.
Read more about Jesse Keating

View More author details
Right arrow

Questions

  1. Why is an inventory important to Ansible?

    a) It forms part of Ansible's configuration management database.

    b) It is used to audit your servers.

    c) It tells Ansible which servers to perform automation tasks on.

    d) None of the above.

  2. When working with frequently changing infrastructures (such as public cloud deployments), Ansible users must manually update their inventory on a regular basis. Is this true or false?

    a) True – this is the only way to do it.

    b) False – dynamic inventories were invented for precisely this purpose.

  3. By default, Ansible processes hosts in an inventory in which order?

    a) In alphabetical order

    b) In lexicographical order

    c) In random order

    d) In the order in which they appear in the inventory

  4. By default, Ansible tasks in a simple playbook are executed in which order?

    a) In the order in which they are written, but each task must be completed on all inventory hosts before the next is executed.

    b) In the most optimal order.

    c) In the order in which they are written but only on one inventory host at a time.

    d) Something else.

  5. Which variable type takes the highest priority, overriding all other variable sources?

    a) Inventory variables

    b) Extra variables (from the command line)

    c) Role defaults

    d) Variables source via vars_prompt

  6. What is the name of the special Ansible variables that only exist at runtime?

    a) Special variables

    b) Runtime variables

    c) Magic variables

    d) User variables

  7. If you wanted to access external data from a playbook, what would you use?

    a) A lookup plugin

    b) A lookup module

    c) A lookup executable

    d) A lookup role

  8. What is Ansible's preferred default transport mechanism for most non-Windows hosts?

    a) The REST API

    b) RabbitMQ

    c) RSH

    d) SSH

  9. What can inventory variables be used to do?

    a) Define unique data for each host or group of hosts in an inventory.

    b) Declare your playbook variables.

    c) Define connection parameters for your inventory hosts.

    d) Both (a) and (c).

  10. How can you override the default Ansible configuration on your system?

    a) By creating an Ansible configuration file in any location, and using the ANSIBLE_CFG environment variable to specify this location.

    b) By creating a file called ansible.cfg in the current working directory.

    c) By creating a file in your home directory called ~/.ansible.cfg.

    d) Any of the above.

Previous PageNext Chapter
You have been reading a chapter from
Mastering Ansible, 4th Edition - Fourth Edition
Published in: Dec 2021Publisher: PacktISBN-13: 9781801818780
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
James Freeman

James Freeman is an accomplished IT professional with over 25 years' experience in the technology industry. He has more than a decade of first-hand experience in solving real-world enterprise problems in production environments using Ansible, open source, and AWS. As part of this work, he frequently introduces Ansible as a new technology to businesses and CTOs for the first time. In addition, he has co-authored five books and one video training course on Ansible, facilitated bespoke Ansible workshops and training sessions, and presented at both international conferences and meetups on Ansible.
Read more about James Freeman

author image
Jesse Keating

Jesse Keating is an accomplished Ansible user, contributor, and presenter. He has been an active member of the Linux and open source community for over 15 years. He has firsthand experience involving a variety of IT activities, software development, and large-scale system administration. He has presented at numerous conferences and meetups, and has written many articles on a variety of topics.
Read more about Jesse Keating