sydro / atom-ansible-vault

Atom package to create and modify ansible-vault file
MIT License
32 stars 10 forks source link

Encryption fails if ANSIBLE_VAULT_PASSWORD_FILE is defined #45

Open jmgrady opened 4 years ago

jmgrady commented 4 years ago

Describe the bug If the environment variable, ANSIBLE_VAULT_PASSWORD_FILE is defined, encryption will fail with the following exception:

ERROR! Unexpected Exception, this is probably a bug: 'tuple' object has no attribute 'append'

To Reproduce Steps to reproduce the behavior:

  1. Set and export ANSIBLE_VAULT_PASSWORD_FILE;
  2. Start atom
  3. Configure ansible-vault package as follows:
    • Set Ansible Vault absolute path
    • Enable automatic de- and encrypt: false
    • User vault password file defined in ansible.cfg: false
    • Use specific vault password file: true
    • Vault password file path: path to password file, e.g. /home/grady/.ansible-vault
  4. Open a file that has been encrypted using ansible-vault
  5. Decrypt by pressing Ctrl-Alt-0; file is decrypted correctly
  6. Encrypt the file by pressing Ctrl-Alt-0; file is not encrypted and an error is thrown:
    ERROR! Unexpected Exception, this is probably a bug: 'tuple' object has no attribute 'append'

    Expected behavior Expected the file to be re-encrypted.

Note that the package throws the same error if automatic decrypt/encrypt is enabled and the file is closed.

Desktop:

Additional context Add any other context about the problem here.