Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Ansible

You're reading from   Mastering Ansible Design, develop, and solve real world automation and orchestration needs by unlocking the automation capabilities of Ansible

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781784395483
Length 236 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Developing dynamic inventory plugins


Inventory plugins are bits of code that will create inventory data for an Ansible execution. In many environments, the simple ini file style inventory source and variable structure is not sufficient to represent the actual infrastructure being managed. In such cases, a dynamic inventory source is desired, one that will discover the inventory and data at runtime for every execution of Ansible. A number of these dynamic sources ship with Ansible, primarily to operate Ansible with the infrastructure built into one cloud computing platform or another. A short, incomplete list of dynamic inventory plugins that ship with Ansible includes:

  • apache-libcloud

  • cobbler

  • console_io

  • digital_ocean

  • docker

  • ec2

  • gce

  • libvirt_lxc

  • linode

  • openshift

  • openstack

  • rax

  • vagrant

  • vmware

  • windows_azure

An inventory plugin is essentially an executable script. Ansible calls the script with set arguments (--list or --host <hostname>) and expects JSON formatted output on...

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 $19.99/month. Cancel anytime