dbrennand / ansible-role-autorestic

Ansible role to configure backups using autorestic.
https://galaxy.ansible.com/dbrennand/autorestic
MIT License
10 stars 3 forks source link

Permission denied: b'/opt/restic' #6

Closed dbrennand closed 1 year ago

dbrennand commented 1 year ago
TASK [dbrennand.autorestic : Ensure restic install directory exists] *******************************************************************************
fatal: [nuc.net.domain.tld]: FAILED! => {"changed": false, "msg": "There was an issue creating /opt/restic as requested: [Errno 13] Permission denied: b'/opt/restic'", "path": "/opt/restic/bin"}

@whysthatso - I think was most likely introduced in #5 because /opt is owned by user root.

whysthatso commented 1 year ago

hm, yes. i guess the assumption here is that one runs the role with root privileges, which should probably guarded for?

i'm not sure what's the common way to do this in roles, just the normal become ritual?

dbrennand commented 1 year ago

Hey @whysthatso - Thanks for the fast reply 🙂

Yes that's exactly my thinking too, I'm just testing a fix in https://github.com/dbrennand/ansible-role-autorestic/tree/fix/%236