mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fix template module incorrectly handling mode when dest is a directory
Fixes #9350
This commit is contained in:
parent
1e12d3028c
commit
feb9ed1de8
3 changed files with 41 additions and 5 deletions
|
@ -133,9 +133,12 @@ class ActionModule(object):
|
|||
# when running the file module based on the template data, we do
|
||||
# not want the source filename (the name of the template) to be used,
|
||||
# since this would mess up links, so we clear the src param and tell
|
||||
# the module to follow links
|
||||
# the module to follow links. When doing that, we have to set
|
||||
# original_basename to the template just in case the dest is
|
||||
# a directory.
|
||||
new_module_args = dict(
|
||||
src=None,
|
||||
original_basename=os.path.basename(source),
|
||||
follow=True,
|
||||
)
|
||||
# be sure to inject the check mode param into the module args and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue