From e1ee052c661eba7c46174280b076011422245df0 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 14 May 2018 17:39:25 +0200 Subject: [PATCH] iscsi-gw: fix issue when trying to mask target MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit trying to mask target when `/etc/systemd/system/target.service` doesn't exist seems to be a bug. There is no need to mask a unit file which doesn't exist. Signed-off-by: Guillaume Abrioux (cherry picked from commit a145caf947aec64467150a007b7aafe57abe2891) Signed-off-by: Sébastien Han --- roles/ceph-iscsi-gw/tasks/prerequisites.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/ceph-iscsi-gw/tasks/prerequisites.yml b/roles/ceph-iscsi-gw/tasks/prerequisites.yml index 347488531..32d3d5165 100644 --- a/roles/ceph-iscsi-gw/tasks/prerequisites.yml +++ b/roles/ceph-iscsi-gw/tasks/prerequisites.yml @@ -60,7 +60,8 @@ masked: yes enabled: no when: - - target.stat.exists == False or (target.stat.exists and target.stat.islnk == False) + - target.stat.exists + - target.stat.islnk == False - name: enable the rbd-target-gw service and make sure it is running service: -- 2.39.5