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 <gabrioux@redhat.com>
(cherry picked from commit
a145caf947aec64467150a007b7aafe57abe2891)
Signed-off-by: Sébastien Han <seb@redhat.com>
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: