konstruktoid/ansible-role-docker-rootless

Standalone ansible role

tabic opened this issue · 6 comments

tabic commented

Is it planned or are you interested in to make this current example to a standalone ansible role to install rootless docker? From a first look this means removing the nginx stuff and maybe also adding support for installation of rootless docker for multiple users

Additionally you deploy a rootfull systemd service here but stop it afterwards, what's the point?

Hi @tabic, I've thought about it and will probably start writing a role next week or so. As you point out, it's mostly removing the container stuff and adding some more reasonable variables.

https://github.com/konstruktoid/ansible-docker-rootless/blob/main/tasks/docker_service_rootful.yml#L13 is due to package dependencies (see e.g. docker/docker-install#212 and https://github.com/docker/docker-ce-packaging/blob/3f2b79d/deb/common/control#L85) and since we install the Docker daemon we might as well use reasonable defaults as well (https://github.com/konstruktoid/ansible-docker-rootless/blob/main/defaults/main.yml#L10), but the daemon itself is disabled since we don't actually need it when running as rootless later on.

And, as a reminder to myself, perhaps just save the current stuff as a example branch and rewrite the README as proper roles documentation.

tabic commented

That's great! If you wouldn't do it I would have done it ;)

due to package dependencies

I see, that looks bad. Downloading the binaries is not the best solution either but sounds still better to me.

and since we install the Docker daemon we might as well use reasonable defaults as well
but the daemon itself is disabled since we don't actually need it

We could override the docker systemd service with /bin/false so it will definitely never start, what do you think?

We could override the docker systemd service with /bin/false so it will definitely never start, what do you think?

I think a systemd disable or mask is more flexible and standardized, and some might actually want to run both.

It has begun.