ansible-vault doesn't prompt to create vault password

559 views
Skip to first unread message

Matt Mullen

unread,
Aug 9, 2017, 6:29:55 PM8/9/17
to Ansible Project
I'm running 2.4.0 and trying to encrypt a file with ansible-vault.  In past versions of Ansible, this command would prompt to create a vault password to encrypt the file:

C02NVAEGG3QJ:playbooks mullenma$ ansible-vault encrypt test.yml
Usage: ansible-vault encrypt [options] file_name

encryption/decryption utility for Ansible data files

Options:
  --ask-vault-pass      ask for vault password
  -h, --help            show this help message and exit
  --new-vault-id=NEW_VAULT_ID
                        the new vault identity to use for rekey
  --new-vault-password-file=NEW_VAULT_PASSWORD_FILES
                        new vault password file for rekey
  --output=OUTPUT_FILE  output file name for encrypt or decrypt; use - for
                        stdout
  --vault-id=VAULT_IDS  the vault identity to use
  --vault-password-file=VAULT_PASSWORD_FILES
                        vault password file
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable
                        connection debugging)
  --version             show program's version number and exit

 See 'ansible-vault <command> --help' for more information on a specific
command.
ERROR! A vault password is required to use Ansible's Vault

I also tried to utilize the create keyword, with similar results:

C02NVAEGG3QJ:playbooks mullenma$ ansible-vault create test.yml
Usage: ansible-vault create [options] file_name

encryption/decryption utility for Ansible data files

Options:
  --ask-vault-pass      ask for vault password
  -h, --help            show this help message and exit
  --new-vault-id=NEW_VAULT_ID
                        the new vault identity to use for rekey
  --new-vault-password-file=NEW_VAULT_PASSWORD_FILES
                        new vault password file for rekey
  --output=OUTPUT_FILE  output file name for encrypt or decrypt; use - for
                        stdout
  --vault-id=VAULT_IDS  the vault identity to use
  --vault-password-file=VAULT_PASSWORD_FILES
                        vault password file
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable
                        connection debugging)
  --version             show program's version number and exit

 See 'ansible-vault <command> --help' for more information on a specific
command.
ERROR! A vault password is required to use Ansible's Vault

Is there something I am missing,  or is this not working correctly?

Thanks,
Matt

Adrian Likins

unread,
Aug 14, 2017, 1:12:22 PM8/14/17
to ansible...@googlegroups.com
hmm, thats a bug. I'll take a look at it, but filing at issue at github wouldn't hurt.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/880ae29b-47d8-449e-bf04-b02e330ce11b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian Likins

unread,
Aug 14, 2017, 1:14:17 PM8/14/17
to ansible...@googlegroups.com
And for now, in 2.4:

    ansible-vault --ask-vault-pass create foo.yml

or

    ansible-vault --vault-id=prompt create foo.yml


Matt Mullen

unread,
Aug 14, 2017, 2:19:39 PM8/14/17
to ansible...@googlegroups.com
That works, thanks!  

For anyone else hitting this,  it was an already open issue:  https://github.com/ansible/ansible/issues/27885



You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/l-8BBfSZGRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscribe@googlegroups.com.

To post to this group, send email to ansible-project@googlegroups.com.

Adrian Likins

unread,
Aug 16, 2017, 2:53:51 PM8/16/17
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages