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
f5a6c36d
Commit
f5a6c36d
authored
Sep 15, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure remote files are chmod'd properly for su/su_user too
Fixes #8594
parent
af269a15
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
lib/ansible/runner/action_plugins/assemble.py
+1
-1
lib/ansible/runner/action_plugins/copy.py
+1
-1
lib/ansible/runner/action_plugins/template.py
+1
-1
lib/ansible/runner/action_plugins/unarchive.py
+1
-1
No files found.
lib/ansible/runner/action_plugins/assemble.py
View file @
f5a6c36d
...
...
@@ -124,7 +124,7 @@ class ActionModule(object):
xfered
=
self
.
runner
.
_transfer_str
(
conn
,
tmp
,
'src'
,
resultant
)
# fix file permissions when the copy is done as a different user
if
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
:
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'
,
xfered
,
tmp
)
# run the copy module
...
...
lib/ansible/runner/action_plugins/copy.py
View file @
f5a6c36d
...
...
@@ -227,7 +227,7 @@ class ActionModule(object):
self
.
_remove_tempfile_if_content_defined
(
content
,
content_tempfile
)
# fix file permissions when the copy is done as a different user
if
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
and
not
raw
:
if
(
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
or
self
.
runner
.
su
and
self
.
runner
.
su_user
!=
'root'
)
and
not
raw
:
self
.
runner
.
_remote_chmod
(
conn
,
'a+r'
,
tmp_src
,
tmp_path
)
if
raw
:
...
...
lib/ansible/runner/action_plugins/template.py
View file @
f5a6c36d
...
...
@@ -113,7 +113,7 @@ class ActionModule(object):
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'
:
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'
,
xfered
,
tmp
)
# run the copy module
...
...
lib/ansible/runner/action_plugins/unarchive.py
View file @
f5a6c36d
...
...
@@ -76,7 +76,7 @@ class ActionModule(object):
# handle check mode client side
# fix file permissions when the copy is done as a different user
if
copy
:
if
self
.
runner
.
sudo
and
self
.
runner
.
sudo_user
!=
'root'
:
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
)
# Build temporary module_args.
new_module_args
=
dict
(
...
...
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