mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
@@ -59,9 +59,10 @@ class ActionModule(object):
|
|||||||
# do not run the command if the line contains creates=filename
|
# do not run the command if the line contains creates=filename
|
||||||
# and the filename already exists. This allows idempotence
|
# and the filename already exists. This allows idempotence
|
||||||
# of command executions.
|
# of command executions.
|
||||||
module_args_tmp = "path=%s" % creates
|
module_args_tmp = ""
|
||||||
|
complex_args_tmp = dict(path=creates, get_md5=False, get_checksum=False)
|
||||||
module_return = self.runner._execute_module(conn, tmp, 'stat', module_args_tmp, inject=inject,
|
module_return = self.runner._execute_module(conn, tmp, 'stat', module_args_tmp, inject=inject,
|
||||||
complex_args=complex_args, persist_files=True)
|
complex_args=complex_args_tmp, persist_files=True)
|
||||||
stat = module_return.result.get('stat', None)
|
stat = module_return.result.get('stat', None)
|
||||||
if stat and stat.get('exists', False):
|
if stat and stat.get('exists', False):
|
||||||
return ReturnData(
|
return ReturnData(
|
||||||
|
|||||||
Reference in New Issue
Block a user