From: Guillaume Abrioux Date: Mon, 4 Mar 2019 16:45:51 +0000 (+0100) Subject: nfs: fix systemd template service for ubuntu X-Git-Tag: v4.0.0rc1~55 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=359f8a9a4a2a20d82fedc2aa9e7afe20efa8bb53;p=ceph-ansible.git nfs: fix systemd template service for ubuntu `mkdir` is located in `/bin` on Ubuntu. Let's use some jinja to support Ubuntu. Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-nfs/templates/ceph-nfs.service.j2 b/roles/ceph-nfs/templates/ceph-nfs.service.j2 index 82cc61759..1261e28ba 100644 --- a/roles/ceph-nfs/templates/ceph-nfs.service.j2 +++ b/roles/ceph-nfs/templates/ceph-nfs.service.j2 @@ -6,7 +6,7 @@ After=docker.service [Service] EnvironmentFile=-/etc/environment ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-nfs-%i -ExecStartPre=/usr/bin/mkdir -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha +ExecStartPre={{ '/bin/mkdir' if ansible_os_family == 'Debian' else '/usr/bin/mkdir' }} -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \