{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/15577","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/15577/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/15577/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/15577/events","html_url":"https://github.com/ansible/ansible/issues/15577","id":150829274,"number":15577,"title":"Change default editor for ansible-vault","user":{"login":"pstauffer","id":2341248,"avatar_url":"https://avatars.githubusercontent.com/u/2341248?v=3","gravatar_id":"","url":"https://api.github.com/users/pstauffer","html_url":"https://github.com/pstauffer","followers_url":"https://api.github.com/users/pstauffer/followers","following_url":"https://api.github.com/users/pstauffer/following{/other_user}","gists_url":"https://api.github.com/users/pstauffer/gists{/gist_id}","starred_url":"https://api.github.com/users/pstauffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstauffer/subscriptions","organizations_url":"https://api.github.com/users/pstauffer/orgs","repos_url":"https://api.github.com/users/pstauffer/repos","events_url":"https://api.github.com/users/pstauffer/events{/privacy}","received_events_url":"https://api.github.com/users/pstauffer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T11:31:19Z","updated_at":"2016-04-25T11:31:19Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Feature Idea\r\n\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.0.2.0\r\n  config file =\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\nNone\r\n\r\n##### OS / ENVIRONMENT\r\nDebian 7.9\r\n\r\n##### SUMMARY\r\nIn the [vault documentation](http://docs.ansible.com/ansible/playbooks_vault.html#creating-encrypted-files) is the following described:\r\n```\r\nAfter providing a password, the tool will launch whatever editor you have defined with $EDITOR, and defaults to vim.\r\n```\r\n\r\nIf `vim` is not installed, the error-messages is a little bit tricky to unterstand.\r\n\r\nSo is it possible to\r\n* change the default EDITOR to `vi` instead of `vim`. Because `vim` is not installed on every os distribution.\r\n* modify the error description with a hint, that the EDITOR wasn't found.\r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n```\r\nansible-vault create -vvvv test2.yml\r\n```\r\n\r\n##### ACTUAL RESULTS\r\n\r\n```\r\nNo config file found; using defaults\r\nNew Vault password:\r\nConfirm New Vault password:\r\nERROR! Unexpected Exception: [Errno 2] No such file or directory\r\nthe full traceback was:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/ansible-vault\", line 86, in <module>\r\n    sys.exit(cli.run())\r\n  File \"/usr/local/lib/python2.7/dist-packages/ansible/cli/vault.py\", line 120, in run\r\n    self.execute()\r\n  File \"/usr/local/lib/python2.7/dist-packages/ansible/cli/__init__.py\", line 114, in execute\r\n    fn()\r\n  File \"/usr/local/lib/python2.7/dist-packages/ansible/cli/vault.py\", line 152, in execute_create\r\n    self.editor.create_file(self.args[0])\r\n  File \"/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py\", line 351, in create_file\r\n    self._edit_file_helper(filename)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py\", line 302, in _edit_file_helper\r\n    call(self._editor_shell_command(tmp_path))\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 493, in call\r\n    return Popen(*popenargs, **kwargs).wait()\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 679, in __init__\r\n    errread, errwrite)\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 1259, in _execute_child\r\n    raise child_exception\r\nOSError: [Errno 2] No such file or directory\r\n```\r\n"}}