March 2019
Intermediate to advanced
412 pages
9h 49m
English
To demonstrate developing an inventory plugin, we'll create one that simply prints the same host data we've been using in our mastery-hosts file. Integrating with a custom asset management system or an infrastructure provider is a bit beyond the scope of this book, so we'll simply code the systems into the plugin itself. We'll write our inventory plugin to a file in the top level of our project root named mastery-inventory.py and make it executable. We'll use Python for this file, to handle execution arguments and JSON formatting with ease:
#!/usr/bin/env python #
Read now
Unlock full access