Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
edx
configuration
Commits
989fa18c
Commit
989fa18c
authored
Jun 18, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a virtualenv for the python sandbox.
parent
8403ea98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
playbooks/roles/xserver/tasks/main.yml
+6
-3
playbooks/roles/xserver/vars/main.yml
+2
-0
No files found.
playbooks/roles/xserver/tasks/main.yml
View file @
989fa18c
...
...
@@ -7,11 +7,14 @@
-
name
:
ensure sandbox user exists
user
:
name=sandbox group=sandbox
-
name
:
create sandbox python directory
file
:
path={{ sandbox_venv_dir }} owner=ubuntu group=adm moe=2775 state=directory
-
name
:
create sandbox python
shell
:
cp /usr/bin/python2.7 /usr/bin/python-sandbox
command
:
/usr/local/bin/virtualenv {{ sandbox_venv_dir }} --distribute creates={{ sandbox_venv_dir }}/bin/activate
-
name
:
set sandbox sudoers settings
copy
:
src=
01-sandbox dest=/etc/sudoers.d/01
-sandbox
copy
:
src=
sandbox.sudoers dest=/etc/sudoers.d/99
-sandbox
# Make sure this line is in the common-session file.
-
name
:
ensure pam-limits module is loaded
...
...
@@ -30,7 +33,7 @@
copy
:
src=usr.bin.python-sandbox dest=/etc/apparmor.d/usr.bin.python-sandbox
-
name
:
enforce app-armor rules
shell
:
aa-enforce /usr/bin/python-sandbox
command
:
aa-enforce {{ sandbox_venv_dir }}
-
name
:
setup upstart script
template
:
src=xserver.conf.j2 dest=/etc/init/xserver.conf owner=root group=root
...
...
playbooks/roles/xserver/vars/main.yml
View file @
989fa18c
...
...
@@ -5,3 +5,5 @@ xserver_source_repo: git://github.com/edx/xserver.git
# This should probably be overridden in the playbook or groupvars
# with the default pointing to the head of master.
xserver_version
:
HEAD
sandbox_venv_dir
:
"
{{
venv_dir
}}_apparmor_sandbox"
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