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
0709c48f
Commit
0709c48f
authored
Sep 07, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1018 from willthames/template_perms
Fix templates for non root sudo_user
parents
022b2290
f456d999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
lib/ansible/runner/action_plugins/template.py
+4
-1
No files found.
lib/ansible/runner/action_plugins/template.py
View file @
0709c48f
...
...
@@ -70,7 +70,10 @@ class ActionModule(object):
return
ReturnData
(
conn
=
conn
,
comm_ok
=
False
,
result
=
result
)
xfered
=
self
.
runner
.
_transfer_str
(
conn
,
tmp
,
'source'
,
resultant
)
# fix file permissions when the copy is done as a different user
if
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
:
self
.
runner
.
_low_level_exec_command
(
conn
,
"chmod a+r
%
s"
%
xfered
,
tmp
)
# run the copy module, queue the file module
self
.
runner
.
module_args
=
"
%
s src=
%
s dest=
%
s"
%
(
self
.
runner
.
module_args
,
xfered
,
dest
)
return
self
.
runner
.
_execute_module
(
conn
,
tmp
,
'copy'
,
self
.
runner
.
module_args
,
inject
=
inject
)
.
daisychain
(
'file'
)
...
...
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