ansible-vault encrypt /etc/ansible/group_vars/all.yml gives me the error Unexpected Exception, this is probably a bug: [Errno 13] Permission denied: ‘/etc/ansible/group_vars/all.yml’
Hi,
Welcome to the forum.
I’m guessing that the user you are running ansible-playbook as doesn’t have permission to read that file.
I would suggest having your Ansible files in a git checkout in the user’s home directory, see this guide
https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#directory-layout
2 Likes