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
19703617
Commit
19703617
authored
Sep 25, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix action_plugins for modules not respecting check mode
Fixes #9140
parent
86edd038
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
lib/ansible/runner/action_plugins/assemble.py
+5
-0
lib/ansible/runner/action_plugins/unarchive.py
+10
-1
No files found.
lib/ansible/runner/action_plugins/assemble.py
View file @
19703617
...
...
@@ -147,6 +147,11 @@ class ActionModule(object):
dest
=
dest
,
original_basename
=
os
.
path
.
basename
(
src
),
)
# make sure checkmod is passed on correctly
if
self
.
runner
.
noop_on_check
(
inject
):
new_module_args
[
'CHECKMODE'
]
=
True
module_args_tmp
=
utils
.
merge_module_args
(
module_args
,
new_module_args
)
return
self
.
runner
.
_execute_module
(
conn
,
tmp
,
'file'
,
module_args_tmp
,
inject
=
inject
)
lib/ansible/runner/action_plugins/unarchive.py
View file @
19703617
...
...
@@ -77,13 +77,22 @@ class ActionModule(object):
# fix file permissions when the copy is done as a different user
if
copy
:
if
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
or
self
.
runner
.
su
and
self
.
runner
.
su_user
!=
'root'
:
self
.
runner
.
_remote_chmod
(
conn
,
'a+r'
,
tmp_src
,
tmp
)
if
not
self
.
runner
.
noop_on_check
(
inject
):
self
.
runner
.
_remote_chmod
(
conn
,
'a+r'
,
tmp_src
,
tmp
)
# Build temporary module_args.
new_module_args
=
dict
(
src
=
tmp_src
,
original_basename
=
os
.
path
.
basename
(
source
),
)
# make sure checkmod is passed on correctly
if
self
.
runner
.
noop_on_check
(
inject
):
new_module_args
[
'CHECKMODE'
]
=
True
module_args
=
utils
.
merge_module_args
(
module_args
,
new_module_args
)
else
:
module_args
=
"
%
s original_basename=
%
s"
%
(
module_args
,
pipes
.
quote
(
os
.
path
.
basename
(
source
)))
# make sure checkmod is passed on correctly
if
self
.
runner
.
noop_on_check
(
inject
):
module_args
+=
" CHECKMODE=True"
return
self
.
runner
.
_execute_module
(
conn
,
tmp
,
'unarchive'
,
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