deploy_helper: fix a bug when not defining release on state=clean (#1859)
* Fix a bug when not defining release on state=clean * Add changelog fragmentpull/1880/head
parent
c0f3a63e18
commit
abfbe2a48d
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- deploy_helper - allow ``state=clean`` to be used without defining a ``release`` (https://github.com/ansible-collections/community.general/issues/1852).
|
|
@ -408,6 +408,9 @@ class DeployHelper(object):
|
|||
def remove_unfinished_link(self, path):
|
||||
changed = False
|
||||
|
||||
if not self.release:
|
||||
return changed
|
||||
|
||||
tmp_link_name = os.path.join(path, self.release + '.' + self.unfinished_filename)
|
||||
if not self.module.check_mode and os.path.exists(tmp_link_name):
|
||||
changed = True
|
||||
|
|
Loading…
Reference in New Issue