Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Ansible, 4th Edition - Fourth Edition

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

Product type Book
Published in Dec 2021
Publisher Packt
ISBN-13 9781801818780
Pages 540 pages
Edition 4th Edition
Languages
Authors (2):
James Freeman James Freeman
Profile icon James Freeman
Jesse Keating Jesse Keating
Profile icon Jesse Keating
View More author details

Table of Contents (18) Chapters

Preface 1. Section 1: Ansible Overview and Fundamentals
2. Chapter 1: The System Architecture and Design of Ansible 3. Chapter 2: Migrating from Earlier Ansible Versions 4. Chapter 3: Protecting Your Secrets with Ansible 5. Chapter 4: Ansible and Windows – Not Just for Linux 6. Chapter 5: Infrastructure Management for Enterprises with AWX 7. Section 2: Writing and Troubleshooting Ansible Playbooks
8. Chapter 6: Unlocking the Power of Jinja2 Templates 9. Chapter 7: Controlling Task Conditions 10. Chapter 8: Composing Reusable Ansible Content with Roles 11. Chapter 9: Troubleshooting Ansible 12. Chapter 10: Extending Ansible 13. Section 3: Orchestration with Ansible
14. Chapter 11: Minimizing Downtime with Rolling Deployments 15. Chapter 12: Infrastructure Provisioning 16. Chapter 13: Network Automation 17. Other Books You May Enjoy

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.

You have been reading a chapter from
Mastering Ansible, 4th Edition - Fourth Edition
Published in: Dec 2021 Publisher: Packt ISBN-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.
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 €14.99/month. Cancel anytime}