@@ -51,13 +51,13 @@ def run(self, tmp=None, task_vars=None):
51
51
dest = task_args .get ('dest' , None )
52
52
content = task_args .get ('content' , None )
53
53
54
- force = _process_boolean (task_args .get ('force ' ), default = True )
54
+ replace = _process_boolean (task_args .get ('replace ' ), default = True )
55
55
backup = _process_boolean (task_args .get ('backup' ), default = False )
56
56
local_follow = _process_boolean (task_args .get ('local_follow' ), default = False )
57
57
remote_src = _process_boolean (task_args .get ('remote_src' ), default = False )
58
58
is_binary = _process_boolean (task_args .get ('is_binary' ), default = False )
59
- force_lock = _process_boolean (task_args .get ('force_lock ' ), default = False )
60
- executable = _process_boolean (task_args .get ('executable ' ), default = False )
59
+ force = _process_boolean (task_args .get ('force ' ), default = False )
60
+ is_executable = _process_boolean (task_args .get ('is_executable ' ), default = False )
61
61
asa_text = _process_boolean (task_args .get ('asa_text' ), default = False )
62
62
ignore_sftp_stderr = _process_boolean (task_args .get ("ignore_sftp_stderr" ), default = True )
63
63
backup_name = task_args .get ("backup_name" , None )
@@ -116,8 +116,8 @@ def run(self, tmp=None, task_vars=None):
116
116
msg = "Both 'is_binary' and 'asa_text' are True. Unable to copy binary data as an ASA text file."
117
117
return self ._exit_action (result , msg , failed = True )
118
118
119
- if executable and asa_text :
120
- msg = "Both 'executable ' and 'asa_text' are True. Unable to copy an executable as an ASA text file."
119
+ if is_executable and asa_text :
120
+ msg = "Both 'is_executable ' and 'asa_text' are True. Unable to copy an is_executable as an ASA text file."
121
121
return self ._exit_action (result , msg , failed = True )
122
122
123
123
use_template = _process_boolean (task_args .get ("use_template" ), default = False )
@@ -130,9 +130,9 @@ def run(self, tmp=None, task_vars=None):
130
130
msg = "Cannot specify 'mode', 'owner' or 'group' for MVS destination"
131
131
return self ._exit_action (result , msg , failed = True )
132
132
133
- if force_lock :
133
+ if force :
134
134
display .warning (
135
- msg = "Using force_lock uses operations that are subject to race conditions and can lead to data loss, use with caution." )
135
+ msg = "Using force uses operations that are subject to race conditions and can lead to data loss, use with caution." )
136
136
template_dir = None
137
137
138
138
if not remote_src :
@@ -293,7 +293,7 @@ def run(self, tmp=None, task_vars=None):
293
293
path = os .path .normpath (f"{ self .tmp_dir } /ansible-zos-copy" )
294
294
rm_res = self ._connection .exec_command (f"rm -rf { path } *" )
295
295
296
- if copy_res .get ("note" ) and not force :
296
+ if copy_res .get ("note" ) and not replace :
297
297
result ["note" ] = copy_res .get ("note" )
298
298
return result
299
299
0 commit comments