If the ansible_ssh_user is different from root (but still a sudoer), the created systemd service fails to start with this error
docker: open /etc/default/<container name>: permission denied.
My current workaround is to change permissions right after the included mhutter.docker-systemd-service role
- name: Fix https://github.com/mhutter/ansible-docker-systemd-service/issues/45
ansible.builtin.file:
path: /etc/default/<container name>
owner: '{{ ansible_user }}'
mode: '0644'