mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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 fragment
This commit is contained in:
parent
c0f3a63e18
commit
abfbe2a48d
2 changed files with 5 additions and 0 deletions
changelogs/fragments
plugins/modules/web_infrastructure
|
@ -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…
Add table
Reference in a new issue