Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change dynamic_inventory.py into a program

Overview

Ponder the idea of moving the dynamic_inventory.py script into an application that has entry points and a library that can be extended to support multiple storage backends; ie sql, reddis, json...

Problem Description

Presently the dynamic_inventory.py script is a bit one dementional. while it works well enough to build / scale out an infrastructure of both physical and container nodes it could be better developed, implement testing, and provide for a user importable API.

Proposed Change

  • The present dynamic_inventory.py would be changed to a wrapper script / function.
  • The new lib would be installable with the ability to provide / scale inventory as well as manage it.

Playbook Impact

None

Alternatives

leave things the way they are.

Security Impact

No impact on the library, though providing multiple storage backends for the library would open the inventory storage to possible attack vectors assuming the user used a shared storage system as the backend.

Performance Impact

None

End User Impact

None

Deployer Impact

The deployer would have to be aware of the inventory library in the sense that they would need to install it. Besides the added dependencies there shouldnt be a specific deployer impact.

Developer Impact

Added software dependencies.

Dependencies

None

Documentation Impact

The new lib / entry point scripts would need to be documented.

References

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment