summaryrefslogtreecommitdiff
path: root/lib/ansible/cli/vault.py
diff options
context:
space:
mode:
authorSylvia van Os <sylvia@hackerchick.me>2020-04-23 21:15:25 +0200
committerGitHub <noreply@github.com>2020-04-23 15:15:25 -0400
commit3f47610d94c74de8127abe626bff56064d6eea89 (patch)
tree2002127aa6ca9105b9ad2db1652daea18c58a0ee /lib/ansible/cli/vault.py
parent813ea48fcffb2e4852dd6be84ee347f7d5395990 (diff)
downloadansible-3f47610d94c74de8127abe626bff56064d6eea89.tar.gz
Don't crash ansible-vault create when no arguments (#68667)
* Don't crash ansible-vault create when no arguments * Add changelog entry
Diffstat (limited to 'lib/ansible/cli/vault.py')
-rw-r--r--lib/ansible/cli/vault.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/cli/vault.py b/lib/ansible/cli/vault.py
index 6ea330ab4e..e80318b70e 100644
--- a/lib/ansible/cli/vault.py
+++ b/lib/ansible/cli/vault.py
@@ -424,7 +424,7 @@ class VaultCLI(CLI):
def execute_create(self):
''' create and open a file in an editor that will be encrypted with the provided vault secret when closed'''
- if len(context.CLIARGS['args']) > 1:
+ if len(context.CLIARGS['args']) != 1:
raise AnsibleOptionsError("ansible-vault create can take only one filename argument")
self.editor.create_file(context.CLIARGS['args'][0], self.encrypt_secret,