ansible-vault create foo.yml returns [Errno 2] No such file or directory

Hi,

I’m running version 1.6.2 and when going through the documentation and copying the ansible-vault create example:

`

ansible-vault create foo.yml

`

The following is returned:

`

ansible-vault create foo.yml
Vault password:
Confirm Vault password:
ERROR: [Errno 2] No such file or directory

`

When running the encrypt command, on the other hand, it is able to encrypt the file.
Sadly, from the encrypted state, then running the edit command returns the usual ‘[Errno 2]’ error.

Any help is greatly appreciated. Thank you :slight_smile:

Hmm, that’s curious.

Do you have permissions on the current directories and such?

Anyway, 1.6.3 is the latest release version - let us know if the problem exists there.

Hi,

It turns out that when I echo’d $EDITOR in Ubuntu nothing was aliased. Running EDITOR=/usr/bin/vim resolved the issue.

The error message put me on the wrong tracks in the sense that ‘No file or directory’ is not quite the same as something such as ‘No default editor set’.

I hope this helps others.

Ok please make sure there’s a github ticket filed on this one and we can look at better error reporting when EDITOR is not set.

Thanks!