ansible_sign package

Subpackages

Submodules

ansible_sign.cli module

class ansible_sign.cli.AnsibleSignCLI(args)[source]

Bases: object

gpg_sign()[source]
gpg_verify()[source]
parse_args(args)[source]

Parse command line parameters

Parameters:

args (List[str]) – command line parameters as list of strings (for example ["--help"]).

Returns:

command line parameters namespace

Return type:

argparse.Namespace

run_command()[source]

parse_args() will set self.args.func() to the function we wish to execute, based on the subcommand the user ran. These ‘action functions’ will return the integer exit code with which we exit at the very end.

Roughly: 0 = success 1 = error (e.g. file missing, permissions issue, couldn’t parse checksum file, etc.) 2 = checksum verification failed 3 = signature verification failed 4 = signing failed

validate_checksum()[source]

Validate a checksum manifest file. Print a pretty message and return an appropriate exit code.

NOTE that this function does not actually check the path for existence, it leaves that to the caller (which in nearly all cases would need to do so anyway). This function will throw FileNotFoundError if the manifest does not exist.

ansible_sign.cli.main(args)[source]
ansible_sign.cli.run()[source]

Calls main() passing the CLI arguments extracted from sys.argv

This function can be used as entry point to create console scripts with setuptools.

Module contents