Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Ansible 2

You're reading from   Learning Ansible 2 Learn everything you need to manage and handle your systems with ease with Ansible 2 using this comprehensive guide

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher
ISBN-13 9781786464231
Length 266 pages
Edition 2nd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Fabio Alessandro Locati Fabio Alessandro Locati
Author Profile Icon Fabio Alessandro Locati
Fabio Alessandro Locati
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Learning Ansible 2 Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Getting Started with Ansible FREE CHAPTER 2. Automating Simple Tasks 3. Scaling to Multiple Hosts 4. Handling Complex Deployment 5. Going Cloud 6. Getting Notifications from Ansible 7. Creating a Custom Module 8. Debugging and Error Handling 9. Complex Environments 10. Introducing Ansible for Enterprises

The check mode


The check mode (also known as the dry run or no-op mode) will run your playbook in a no-operation mode, that is, it will not apply any changes to the remote host; instead, it will just show the changes that will be introduced when a task is run. Whether the check mode is actually enabled or not depends on each task. There are few commands that you may find interesting. All those modules will have to be run in /usr/lib/python2.7/site-packages/ansible/modules or where your Ansible module folder is (different paths could be possible based on the operating system you are using as well as the way you installed Ansible).

To count the number of available modules on your installation, you can perform this command:

find . -type f | grep '.py$' | grep -v '__init__' | wc -l

With Ansible 2.1.1, the result of this command is 569, since Ansible has that many modules.

If you want to see how many of these support the check mode, you can run:

grep -r 'supports_check_mode=True' | awk -F: '{print...
lock icon The rest of the chapter is locked
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 $15.99/month. Cancel anytime
Visually different images