Only expose rekey options to ansible-vault command

`ansible-vault` is the only cli command which knows how to handle the
rekey options `--new-vault-id` and `--new-vault-password-file`. No
point in exposing those rekey options to any of the other ansible
commands.

On a practical level I think this matters most in ensuring that
`--help` doesn't produce any false/unhelpful output.
This commit is contained in:
Andreas Olsson 2017-12-07 05:50:51 +01:00 committed by Brian Coca
commit b78ab37a94
2 changed files with 6 additions and 3 deletions

View file

@ -110,6 +110,7 @@ class VaultCLI(CLI):
self.parser = CLI.base_parser(
vault_opts=True,
vault_rekey_opts=True,
usage="usage: %%prog [%s] [options] [vaultfile.yml]" % "|".join(self.VALID_ACTIONS),
desc="encryption/decryption utility for Ansible data files",
epilog="\nSee '%s <command> --help' for more information on a specific command.\n\n" % os.path.basename(sys.argv[0])