Make task remove idempotent
Only call RemoteTaskStep if state is not already removed.
@@ -122,6 +122,7 @@ class RemoveTaskJob(AdvertisedJob):
def get_steps(self):
steps = []
+ if self.task.state != "removed":
for host in self.task.filesystem.get_servers():
steps.append((RemoveTaskStep, {"task": self.task.name, "host": host.fqdn}))
