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
10e8d3a3
Commit
10e8d3a3
authored
May 23, 2016
by
Saleem Latif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update edx-configuration to support multiple theme directories
parent
ed7dc2c9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
15 deletions
+70
-15
CHANGELOG.md
+6
-0
playbooks/roles/add_user/tasks/main.yml
+12
-1
playbooks/roles/ecommerce/defaults/main.yml
+2
-2
playbooks/roles/ecommerce/meta/main.yml
+5
-0
playbooks/roles/ecommerce/tasks/main.yml
+0
-9
playbooks/roles/edx_themes/defaults/main.yml
+3
-1
playbooks/roles/edx_themes/meta/main.yml
+2
-2
playbooks/roles/edx_themes/tasks/main.yml
+40
-0
No files found.
CHANGELOG.md
View file @
10e8d3a3
...
...
@@ -134,3 +134,9 @@
-
Role: Edxapp
-
Added EDXAPP_LMS_AUTH_EXTRA and EDXAPP_CMS_AUTH_EXTRA for passing unique AUTH_EXTRA configurations to the LMS and CMS.
Both variables default to EDXAPP_AUTH_EXTRA for backward compatibility
-
Role: ecommerce
-
Renamed
`ECOMMERCE_COMPREHENSIVE_THEME_DIR`
to
`ECOMMERCE_COMPREHENSIVE_THEME_DIRS`
,
`ECOMMERCE_COMPREHENSIVE_THEME_DIRS`
is now a list of directories. Change is backward incompatible.
-
Renamed
`COMPREHENSIVE_THEME_DIR`
to
`COMPREHENSIVE_THEME_DIRS`
,
`COMPREHENSIVE_THEME_DIRS`
is now a list of directories.
Change is backward incompatible.
playbooks/roles/add_user/tasks/main.yml
View file @
10e8d3a3
...
...
@@ -15,7 +15,18 @@
#
# This role performs the repetitive tasks that most edX roles
# require in our default configuration.
#
# create groups for the user
-
name
:
create user groups
group
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
-
"
{{
user_name
}}"
tags
:
-
install
-
install:base
# Generating an ssh key so users can do a git
# clone over ssh for public repositories without any
# additional configuration
...
...
playbooks/roles/ecommerce/defaults/main.yml
View file @
10e8d3a3
...
...
@@ -115,7 +115,7 @@ ECOMMERCE_THEME_SCSS: 'sass/themes/default.scss'
# Directory name inside edx-themes repo that contain ecommerce themes
ECOMMERCE_THEMES_DIR_NAME
:
'
ecommerce'
ECOMMERCE_COMPREHENSIVE_THEME_DIR
:
!!null
ECOMMERCE_COMPREHENSIVE_THEME_DIR
S
:
!!null
ECOMMERCE_ENABLE_COMPREHENSIVE_THEMING
:
false
ECOMMERCE_DEFAULT_SITE_THEME
:
!!null
...
...
@@ -178,7 +178,7 @@ ECOMMERCE_SERVICE_CONFIG:
BROKER_URL
:
'
{{
ECOMMERCE_BROKER_URL
}}'
# Theming config
COMPREHENSIVE_THEME_DIR
:
"
{{
ECOMMERCE_COMPREHENSIVE_THEME_DIR
}}"
COMPREHENSIVE_THEME_DIR
S
:
"
{{
ECOMMERCE_COMPREHENSIVE_THEME_DIRS
}}"
ENABLE_COMPREHENSIVE_THEMING
:
"
{{
ECOMMERCE_ENABLE_COMPREHENSIVE_THEMING
}}"
DEFAULT_SITE_THEME
:
"
{{
ECOMMERCE_DEFAULT_SITE_THEME
}}"
...
...
playbooks/roles/ecommerce/meta/main.yml
View file @
10e8d3a3
...
...
@@ -23,5 +23,10 @@ dependencies:
debian
:
"
{{
ecommerce_debian_pkgs
}}"
redhat
:
"
{{
ecommerce_redhat_pkgs
}}"
-
role
:
edx_themes
theme_users
:
-
"
{{
ecommerce_user
}}"
additional_theme_dirs
:
-
"
{{
ECOMMERCE_COMPREHENSIVE_THEME_DIRS
}}"
when
:
"
{{
ECOMMERCE_ENABLE_COMPREHENSIVE_THEMING
}}"
-
oraclejdk
playbooks/roles/ecommerce/tasks/main.yml
View file @
10e8d3a3
...
...
@@ -20,15 +20,6 @@
# Example play:
#
#
# Copy themes directories.
# When synchronizing we need to make sure that directory path ends with a trailing slash,
# otherwise synchronize will copy the src directory instead of the files/dirs included within the src directory
-
name
:
synchronize theme directories
command
:
"
rsync
-a
{{
THEMES_CODE_DIR
}}/{{
ECOMMERCE_THEMES_DIR_NAME
}}/
{{
ECOMMERCE_COMPREHENSIVE_THEME_DIR
}}"
sudo_user
:
"
{{
ecommerce_user
}}"
when
:
ECOMMERCE_ENABLE_COMPREHENSIVE_THEMING and THEMES_CODE_DIR is defined
-
name
:
"
add
gunicorn
configuration
file"
template
:
>
src=edx/app/ecommerce/ecommerce_gunicorn.py.j2
...
...
playbooks/roles/edx_themes/defaults/main.yml
View file @
10e8d3a3
...
...
@@ -10,8 +10,10 @@
##
# Defaults for role themes
#
themes_service_name
:
"
edx-themes"
themes_user
:
"
{{
themes_service_name
}}"
themes_group
:
"
{{
themes_user
}}"
themes_home
:
"
{{
COMMON_CFG_DIR
}}/{{
themes_service_name
}}"
THEMES_CODE_DIR
:
"
{{
themes_home
}}/{{
themes_service_name
}}"
...
...
@@ -21,7 +23,7 @@ THEMES_GIT_PROTOCOL: "{{ COMMON_GIT_PROTOCOL }}"
THEMES_GIT_MIRROR
:
"
{{
COMMON_GIT_MIRROR
}}"
THEMES_GIT_PATH
:
"
{{
COMMON_GIT_PATH
}}"
THEMES_REPO
:
"
sample-themes.git"
THEMES_VERSION
:
"
master
"
THEMES_VERSION
:
"
release
"
THEMES_REPOS
:
...
...
playbooks/roles/edx_themes/meta/main.yml
View file @
10e8d3a3
...
...
@@ -14,9 +14,9 @@ dependencies:
-
role
:
add_user
user_name
:
"
{{
themes_user
}}"
user_home
:
"
{{
themes_home
}}"
group_name
:
"
{{
themes_
user
}}"
group_name
:
"
{{
themes_
group
}}"
-
role
:
git_clone
repo_owner
:
"
{{
themes_user
}}"
repo_group
:
"
{{
themes_
user
}}"
repo_group
:
"
{{
themes_
group
}}"
GIT_REPOS
:
"
{{
THEMES_REPOS
}}"
git_home
:
"
{{
themes_home
}}"
playbooks/roles/edx_themes/tasks/main.yml
View file @
10e8d3a3
...
...
@@ -25,5 +25,45 @@
#
# dependencies:
# - role: edx_themes
# theme_users:
# - ecommerce
# - edxapp
# additional_theme_dirs:
# - /edx/app/ecommerce/ecommerce/ecommerce/themes
# when do_setup_themes
#
# make sure edx-theme's group has read/write access to themes directory
-
name
:
ensure edx-theme's group has read/write access to themes directory
file
:
path
:
"
{{
themes_home
}}"
state
:
directory
recurse
:
yes
owner
:
"
{{
themes_user
}}"
group
:
"
{{
themes_group
}}"
mode
:
"
g+rw"
tags
:
-
install
-
install:base
-
name
:
assign theme's group to all theme's directories
file
:
path
:
"
{{
item
}}"
state
:
directory
recurse
:
yes
group
:
"
{{
themes_group
}}"
mode
:
"
g+rw"
with_items
:
additional_theme_dirs
when
:
additional_theme_dirs is defined
tags
:
-
install
-
install:base
-
name
:
Add theme users to theme's group so that that have read/write access to themes directories
user
:
name
:
"
{{
item
}}"
shell
:
/bin/bash
groups
:
"
{{
themes_group
}}"
append
:
yes
with_items
:
theme_users
when
:
theme_users is defined
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