Temporarily disable force logic on copy module
This commit is contained in:
parent
4bfe707c9d
commit
f46721add1
1 changed files with 10 additions and 10 deletions
14
library/copy
14
library/copy
|
@ -82,11 +82,11 @@ def main():
|
|||
module = AnsibleModule(
|
||||
# not checking because of daisy chain to file module
|
||||
argument_spec = dict(
|
||||
src=dict(required=False),
|
||||
content=dict(required=False),
|
||||
dest=dict(required=True),
|
||||
backup=dict(default=False, type='bool'),
|
||||
force = dict(default='yes', aliases=['thirsty'], type='bool'),
|
||||
src = dict(required=False),
|
||||
content = dict(required=False),
|
||||
dest = dict(required=True),
|
||||
backup = dict(default=False, type='bool'),
|
||||
force = dict(default=True, aliases=['thirsty'], type='bool'),
|
||||
),
|
||||
add_file_common_args=True,
|
||||
)
|
||||
|
@ -105,8 +105,8 @@ def main():
|
|||
md5sum_dest = None
|
||||
|
||||
if os.path.exists(dest):
|
||||
if not force:
|
||||
module.exit_json(msg="file already exists", src=src, dest=dest, changed=False)
|
||||
# if not force:
|
||||
# module.exit_json(msg="file already exists and force is set (%s)" % force, src=src, dest=dest, changed=False)
|
||||
if (os.path.isdir(dest)):
|
||||
basename = os.path.basename(src)
|
||||
dest = os.path.join(dest, basename)
|
||||
|
|
Loading…
Reference in a new issue