Skip to content

Permissions to env file are not given to the running user if it's not root #45

@v4dkou

Description

@v4dkou

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions