systemd/service: Set docker.service conditionally

We don't need to set After=docker.service when the container_binary
variable isn't set to docker.
It doesn't break anything currently but it could be confusing when
using podman.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
pull/3698/head
Dimitri Savineau 2019-03-07 12:31:39 -05:00 committed by mergify[bot]
parent d6e71d769c
commit a089e1ec23
10 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=RBD Target API Service Description=RBD Target API Service
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=RBD Target Gateway Service Description=RBD Target Gateway Service
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=TCMU Runner Description=TCMU Runner
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Ceph MDS Description=Ceph MDS
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Ceph Manager Description=Ceph Manager
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Ceph Monitor Description=Ceph Monitor
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,7 +1,9 @@
[Unit] [Unit]
Description=NFS-Ganesha file server Description=NFS-Ganesha file server
Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,7 +1,9 @@
# {{ ansible_managed }} # {{ ansible_managed }}
[Unit] [Unit]
Description=Ceph OSD Description=Ceph OSD
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Ceph RBD mirror Description=Ceph RBD mirror
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=-/etc/environment EnvironmentFile=-/etc/environment

View File

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Ceph RGW Description=Ceph RGW
{% if container_binary == 'docker' %}
After=docker.service After=docker.service
{% endif %}
[Service] [Service]
EnvironmentFile=/var/lib/ceph/radosgw/ceph-%i/EnvironmentFile EnvironmentFile=/var/lib/ceph/radosgw/ceph-%i/EnvironmentFile