mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-31 17:19:17 -03:30
roles: docker: Add support for SUSE distributions
Add support for installing Docker on SUSE distributions. The Docker repository at https://yum.dockerproject.org/repo/main/ does not support recent openSUSE distributions so the only alternative is to use the packages from the distro repositories. This however renders the 'docker_version' Ansible variable useless on SUSE.
This commit is contained in:
@@ -7,6 +7,9 @@ Wants=docker-storage-setup.service
|
||||
{% elif ansible_os_family == "Debian" %}
|
||||
After=network.target docker.socket
|
||||
Wants=docker.socket
|
||||
{% elif ansible_os_family == "Suse" %}
|
||||
After=network.target containerd.socket containerd.service
|
||||
Requires=containerd.socket containerd.service
|
||||
{% endif %}
|
||||
|
||||
[Service]
|
||||
@@ -19,6 +22,9 @@ ExecReload=/bin/kill -s HUP $MAINPID
|
||||
Delegate=yes
|
||||
KillMode=process
|
||||
ExecStart={{ docker_bin_dir }}/docker{% if installed_docker_version.stdout|version_compare('17.03', '<') %} daemon{% else %}d{% endif %} \
|
||||
{% if ansible_os_family == "Suse" %}
|
||||
--containerd /run/containerd/containerd.sock --add-runtime oci=/usr/bin/docker-runc \
|
||||
{% endif %}
|
||||
$DOCKER_OPTS \
|
||||
$DOCKER_STORAGE_OPTIONS \
|
||||
$DOCKER_NETWORK_OPTIONS \
|
||||
|
||||
Reference in New Issue
Block a user