ansible_sign package
Subpackages
Submodules
ansible_sign.cli module
- class ansible_sign.cli.AnsibleSignCLI(args)[source]
Bases:
object
- 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:
- 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.