Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
0c4a7492
Commit
0c4a7492
authored
Sep 15, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure checkmode is honored for templates that haven't changed
Fixes #8998
parent
9fb6cabe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
lib/ansible/runner/action_plugins/template.py
+7
-0
No files found.
lib/ansible/runner/action_plugins/template.py
View file @
0c4a7492
...
@@ -132,5 +132,12 @@ class ActionModule(object):
...
@@ -132,5 +132,12 @@ class ActionModule(object):
res
.
diff
=
dict
(
before
=
dest_contents
,
after
=
resultant
)
res
.
diff
=
dict
(
before
=
dest_contents
,
after
=
resultant
)
return
res
return
res
else
:
else
:
# if we're running in check mode, we still want the file module
# to execute, since we can't know if anything would be changed here,
# so we inject the check mode param into the module args and rely on
# the file module to report its changed status
if
self
.
runner
.
noop_on_check
(
inject
):
new_module_args
=
dict
(
CHECKMODE
=
True
)
module_args
=
utils
.
merge_module_args
(
module_args
,
new_module_args
)
return
self
.
runner
.
_execute_module
(
conn
,
tmp
,
'file'
,
module_args
,
inject
=
inject
,
complex_args
=
complex_args
)
return
self
.
runner
.
_execute_module
(
conn
,
tmp
,
'file'
,
module_args
,
inject
=
inject
,
complex_args
=
complex_args
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment