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
227a36ed
Commit
227a36ed
authored
Jun 02, 2016
by
Arbab Nazar
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3076 from edx/arbab/edxapp-main-rewrite
Arbab/edxapp main rewrite
parents
fe5d5569
ea23dd2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
51 deletions
+63
-51
playbooks/roles/edxapp/tasks/main.yml
+63
-51
No files found.
playbooks/roles/edxapp/tasks/main.yml
View file @
227a36ed
...
...
@@ -3,72 +3,71 @@
# - common/tasks/main.yml
---
-
name
:
create application user
user
:
>
name="{{ edxapp_user }}" home="{{ edxapp_app_dir }}"
createhome=no shell=/bin/false
user
:
name
:
"
{{
edxapp_user
}}"
home
:
"
{{
edxapp_app_dir
}}"
createhome
:
no
shell
:
/bin/false
tags
:
-
install
-
install:base
-
name
:
create edxapp user dirs
file
:
>
path="{{ item }}" state=directory
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
file
:
path
:
"
{{
item.path
}}"
state
:
directory
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
common_web_group
}}"
mode
:
"
{{
item.mode
|
default(0755)
}}"
with_items
:
-
"
{{
edxapp_app_dir
}}"
-
{
path
:
"
{{
edxapp_app_dir
}}"
}
# needed for the ansible 1.5 git module
-
"
{{
edxapp_app_dir
}}/.ssh"
-
"
{{
edxapp_venvs_dir
}}"
-
"
{{
edxapp_theme_dir
}}"
-
"
{{
edxapp_staticfile_dir
}}"
-
"
{{
edxapp_course_static_dir
}}"
-
"
{{
edxapp_course_data_dir
}}"
tags
:
-
install
-
install:base
# var should have more permissive permissions than the rest
-
name
:
create edxapp var dir
file
:
>
path={{ edxapp_data_dir }} state=directory mode=0775
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
-
{
path
:
"
{{
edxapp_app_dir
}}/.ssh"
}
-
{
path
:
"
{{
edxapp_venvs_dir
}}"
}
-
{
path
:
"
{{
edxapp_theme_dir
}}"
}
-
{
path
:
"
{{
edxapp_staticfile_dir
}}"
}
-
{
path
:
"
{{
edxapp_course_static_dir
}}"
}
-
{
path
:
"
{{
edxapp_course_data_dir
}}"
}
# var should have more permissive permissions than the rest
-
{
path
:
"
{{
edxapp_data_dir
}}"
,
mode
:
"
0775"
}
# directory to import the courses from github
-
{
path
:
"
{{
EDXAPP_GIT_REPO_DIR
}}"
,
mode
:
"
0775"
}
tags
:
-
install
-
install:base
# directory to import the courses from github
-
name
:
create directory to import the courses from github
file
:
>
path={{ EDXAPP_GIT_REPO_DIR }} state=directory mode=0775
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
# This is a symlink that has to exist because
# we currently can't override the DATA_DIR var
# in edx-platform. TODO: This can be removed once
# VPC-122 is closed
-
name
:
make the course data dir
file
:
src
=
"{{ edxapp_course_data_dir }}"
dest
=
"{{ edxapp_legacy_course_data_dir }}"
state
=
link
owner
=
"{{ edxapp_user }}"
group
=
"{{ common_web_group }}"
src
:
"
{{
edxapp_course_data_dir
}}"
dest
:
"
{{
edxapp_legacy_course_data_dir
}}"
state
:
link
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
common_web_group
}}"
tags
:
-
install
-
install:base
-
name
:
create edxapp log dir
file
:
>
path="{{ edxapp_log_dir }}" state=directory
owner="{{ common_log_user }}" group="{{ common_log_user }}"
file
:
path
:
"
{{
edxapp_log_dir
}}"
state
:
directory
owner
:
"
{{
common_log_user
}}"
group
:
"
{{
common_log_user
}}"
tags
:
-
install
-
install:base
-
name
:
create web-writable edxapp data dirs
file
:
>
path="{{ item }}" state=directory
owner="{{ common_web_user }}" group="{{ edxapp_user }}"
mode="0775"
file
:
path
:
"
{{
item
}}"
state
:
directory
owner
:
"
{{
common_web_user
}}"
group
:
"
{{
edxapp_user
}}"
mode
:
"
0775"
with_items
:
-
"
{{
edxapp_course_data_dir
}}"
-
"
{{
edxapp_upload_dir
}}"
...
...
@@ -79,38 +78,51 @@
# adding chris-lea nodejs repo
-
name
:
add ppas for current versions of nodejs
apt_repository
:
repo="{{ edxapp_chrislea_ppa }}"
apt_repository
:
repo
:
"
{{
edxapp_chrislea_ppa
}}"
tags
:
-
install
-
install:base
-
name
:
install system packages on which LMS and CMS rely
apt
:
pkg={{','.join(edxapp_debian_pkgs)}} state=present update_cache=yes
apt
:
name
:
"
{{
item
}}"
state
:
present
update_cache
:
yes
with_items
:
"
{{
edxapp_debian_pkgs
}}"
tags
:
-
install
-
install:base
-
name
:
set up edxapp .npmrc
template
:
src=.npmrc.j2 dest={{ edxapp_app_dir }}/.npmrc
owner={{ edxapp_user }} group={{ common_web_group }}
mode=0600
src
:
.npmrc.j2
dest
:
"
{{
edxapp_app_dir
}}/.npmrc"
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
common_web_group
}}"
mode
:
0600
tags
:
-
install
-
install:base
-
name
:
create log directories for service variants
file
:
>
path={{ edxapp_log_dir }}/{{ item }} state=directory
owner={{ common_log_user }} group={{ common_log_user }}
mode=0750
with_items
:
service_variants_enabled
file
:
path
:
"
{{
edxapp_log_dir
}}/{{
item
}}"
state
:
directory
owner
:
"
{{
common_log_user
}}"
group
:
"
{{
common_log_user
}}"
mode
:
0750
with_items
:
"
{{
service_variants_enabled
}}"
tags
:
-
install
-
install:base
# Set up the python sandbox execution environment
-
include
:
python_sandbox_env.yml
tags=deploy
-
include
:
python_sandbox_env.yml
when
:
EDXAPP_PYTHON_SANDBOX
tags
:
-
deploy
-
include
:
deploy.yml tags=deploy
-
include
:
deploy.yml
tags
:
-
deploy
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