Simply, add env Editor=nano prior to your ansible-vault command. env EDITOR=nano ansible-vault edit secret-file.cfg