sadv1r / ansible-vault-editor-idea-plugin

Ansible Vault Editor IntelliJ Plugin with auto encryption/decryption
https://plugins.jetbrains.com/plugin/14278-ansible-vault-editor
MIT License
38 stars 5 forks source link

Edited vault missing new line at end of the file (causing linting errors) #149

Closed jadzdotcom closed 2 years ago

jadzdotcom commented 2 years ago

One of our developers reported that they were getting yamllint new-line-at-end-of-file validation errors

https://yamllint.readthedocs.io/en/stable/rules.html?highlight=new-line-at-end-of-file#module-yamllint.rules.new_line_at_end_of_file

Our temporary solution was to stop linting the vault.yml files by updating the project .yamllint configuration with the following entry:

ignore:
  vault.yml

However I figured I would report the issue here in case the missing \n was an oversight.

sadv1r commented 2 years ago

Hi, thanks for your feedback!

Can you please give me some additional info. Do you expect a new line in encrypted version of this vault.yml?

I checked the result of the official ansible-vault encrypt command and they do not include new line at the end of file too. I think this is because ecrypted version of this file is not really a yaml file after encryption regardless of .yaml extension