example_site.inventory

Inventory module.

Must call progfiguration.sitewrapper.set_progfigsite_by_module_name() in this module.

May use helper functions like progfiguration.sitehelpers.invconf.hosts_conf() and progfiguration.sitehelpers.invconf.secrets_conf() to create the hoststore and secretstore.

Attributes

hoststore

The hoststore for the site

secretstore

The secretstore for the site

mint_version

A function that generates a new version when it's called.

Module Contents

example_site.inventory.hoststore

The hoststore for the site

The progfiguration.sitehelpers.invconf.hosts_conf() function returns a progfiguration.sitehelpers.invconf.MemoryHostStore. The path we pass to it can be included in the site package and found relative to the site package root.

example_site.inventory.secretstore

The secretstore for the site

The progfiguration.sitehelpers.invconf.secrets_conf() function returns a progfiguration.sitehelpers.invconf.AgeSecretStore. Note that we pass it the same config file – it reads different sections.

example_site.inventory.mint_version

A function that generates a new version when it’s called.

Set it from sitehelpers.siteversion.mint_version_factory_from_epoch(), which returns a mint_version() implementation that returns f”{maj}.{min}.{epoch}”.

Sites can write their own mint_version() if they wish, perhaps pulling the version from a build number in a CI system.