Inventory PersistenceΒΆ

It is often useful to have access to the inventory that was used during a particular Bang run. Bang already provides the inventory and the host variables to Ansible directly as Python objects when executed as bang, and as a JSON object output to stdout when executed as an Ansible inventory plugin (i.e. bang --list). It should also provide the following features:

  • Store inventory and host variables in a user-specified file.
  • Create latest-inventory symlink to inventory file after each Bang run.
  • Allow configuration of inventory output format (i.e. YAML or JSON). Even though the Ansible inventory plugin API uses JSON as the serialization format, Bang’s default inventory output should be YAML for symmetry since Bang’s input format is YAML as well.
  • Allow configuration of above via command-line arguments, ~/.bangrc, or even ansible.cfg.

Navigation