progfiguration.cli.progfiguration_site_cmd#

The command line interface for progfiguration

Module Contents#

Functions#

_action_version_core()

Retrieve the version of progfiguration core

_action_version_all()

Retrieve the version of progfiguration core and the progfigsite

_action_apply(hoststore, secretstore, nodename[, ...])

Apply configuration for the node 'nodename' to localhost

_action_list(hoststore, collection)

_action_info(hoststore, nodes, groups, functions)

_action_encrypt(secretstore, hoststore, name, value, ...)

_action_decrypt(secretstore, hoststore, nodes, groups, ...)

_action_deploy_apply(hoststore, nodenames, groupnames, ...)

_action_deploy_copy(hoststore, nodenames, groupnames, ...)

_action_validate(progfigsite_modname)

_make_parser()

_main_implementation(*arguments)

main()

The main function for the progfigsite command-line interface

progfiguration.cli.progfiguration_site_cmd._action_version_core()#

Retrieve the version of progfiguration core

progfiguration.cli.progfiguration_site_cmd._action_version_all()#

Retrieve the version of progfiguration core and the progfigsite

progfiguration.cli.progfiguration_site_cmd._action_apply(hoststore: progfiguration.inventory.invstores.HostStore, secretstore: progfiguration.inventory.invstores.SecretStore, nodename: str, roles: List[str] | None = None, force: bool = False)#

Apply configuration for the node ‘nodename’ to localhost

progfiguration.cli.progfiguration_site_cmd._action_list(hoststore: progfiguration.inventory.invstores.HostStore, collection: str)#
progfiguration.cli.progfiguration_site_cmd._action_info(hoststore: progfiguration.inventory.invstores.HostStore, nodes: List[str], groups: List[str], functions: List[str])#
progfiguration.cli.progfiguration_site_cmd._action_encrypt(secretstore: progfiguration.inventory.invstores.SecretStore, hoststore: progfiguration.inventory.invstores.HostStore, name: str, value: str, nodes: List[str], groups: List[str], controller_key: bool, store: bool, stdout: bool)#
progfiguration.cli.progfiguration_site_cmd._action_decrypt(secretstore: progfiguration.inventory.invstores.SecretStore, hoststore: progfiguration.inventory.invstores.HostStore, nodes: List[str], groups: List[str], controller_key: bool)#
progfiguration.cli.progfiguration_site_cmd._action_deploy_apply(hoststore: progfiguration.inventory.invstores.HostStore, nodenames: List[str], groupnames: List[str], roles: List[str], remote_debug: bool, force_apply: bool, keep_remote_file: bool)#
progfiguration.cli.progfiguration_site_cmd._action_deploy_copy(hoststore: progfiguration.inventory.invstores.HostStore, nodenames: List[str], groupnames: List[str], remotepath: str)#
progfiguration.cli.progfiguration_site_cmd._action_validate(progfigsite_modname: str)#
progfiguration.cli.progfiguration_site_cmd._make_parser()#
progfiguration.cli.progfiguration_site_cmd._main_implementation(*arguments)#
progfiguration.cli.progfiguration_site_cmd.main()#

The main function for the progfigsite command-line interface

While this file exists in the core progfiguration package, it is not installed as a command-line script here. Instead, progfigsite packages are expected to add a shim file that calls this function, and configure their Python project to install that shim file as a command-line script.

This function expects an argument that is the Python module path to the progfigsite package. For instance, if the progfigsite package is installed as ‘my_progfigsite’, then this argument should be ‘my_progfigsite’. This package is expected to be installed in the same Python environment as the progfiguration package. Building a pip package with progfiguration build pip will use that shim file to call this function. Building a pyz package with progfiguration build pyz will install the site package as progfigsite in the pyz regardless of what the site package is called, and will call this function with progfigsite as the argument.