From e153f76c9551ed461f377f66c1a51d83dc65bb12 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 27 Jun 2015 00:02:08 -0400 Subject: [PATCH] now validate that we do get a vault password --- lib/ansible/cli/vault.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/cli/vault.py b/lib/ansible/cli/vault.py index 05a48065771..edd054f434d 100644 --- a/lib/ansible/cli/vault.py +++ b/lib/ansible/cli/vault.py @@ -76,6 +76,9 @@ class VaultCLI(CLI): elif self.options.ask_vault_pass: self.vault_pass, _= self.ask_vault_passwords(ask_vault_pass=True, ask_new_vault_pass=False, confirm_new=False) + if not self.vault_pass: + raise AnsibleOptionsError("A password is required to use Ansible's Vault") + self.execute() def execute_create(self):