mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #11336 from saada/patch-1
Update Vault rekey() in vault.py to validate files passed before input
This commit is contained in:
commit
bedfe00de8
1 changed files with 3 additions and 0 deletions
|
@ -119,6 +119,9 @@ class VaultCLI(CLI):
|
||||||
self.display.display("Encryption successful")
|
self.display.display("Encryption successful")
|
||||||
|
|
||||||
def execute_rekey(self):
|
def execute_rekey(self):
|
||||||
|
for f in self.args:
|
||||||
|
if not (os.path.isfile(f)):
|
||||||
|
raise AnsibleError(f + " does not exist")
|
||||||
__, new_password = self.ask_vault_passwords(ask_vault_pass=False, ask_new_vault_pass=True, confirm_new=True)
|
__, new_password = self.ask_vault_passwords(ask_vault_pass=False, ask_new_vault_pass=True, confirm_new=True)
|
||||||
|
|
||||||
for f in self.args:
|
for f in self.args:
|
||||||
|
|
Loading…
Reference in a new issue