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
bbe66e76
Commit
bbe66e76
authored
Oct 24, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1437 from lorin/sudo-nonroot-bugfix
Fix chmod occurring as wrong user when sudo as non-root
parents
2191a4d5
38fdc249
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/runner/__init__.py
+2
-2
No files found.
lib/ansible/runner/__init__.py
View file @
bbe66e76
...
...
@@ -210,7 +210,8 @@ class Runner(object):
cmd_mod
=
""
if
self
.
sudo
and
self
.
sudo_user
!=
'root'
:
# deal with possible umask issues once sudo'ed to other user
cmd_mod
=
"chmod a+r
%
s; "
%
remote_module_path
cmd_chmod
=
"chmod a+r
%
s"
%
remote_module_path
self
.
_low_level_exec_command
(
conn
,
cmd_chmod
,
tmp
,
sudoable
=
False
)
cmd
=
""
if
not
is_new_style
:
...
...
@@ -232,7 +233,6 @@ class Runner(object):
cmd
=
shebang
.
replace
(
"#!"
,
""
)
+
" "
+
cmd
if
tmp
.
find
(
"tmp"
)
!=
-
1
:
cmd
=
cmd
+
"; rm -rf
%
s >/dev/null 2>&1"
%
tmp
cmd
=
cmd_mod
+
cmd
res
=
self
.
_low_level_exec_command
(
conn
,
cmd
,
tmp
,
sudoable
=
True
)
return
ReturnData
(
conn
=
conn
,
result
=
res
)
...
...
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