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
a79fe1b7
Commit
a79fe1b7
authored
Jan 27, 2017
by
Jillian Vogel
Committed by
Sven Marnach
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't enrol the staff user in the demo course if the staff user wasn't created.
parent
10c87e65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
playbooks/roles/demo/defaults/main.yml
+8
-4
playbooks/roles/demo/tasks/deploy.yml
+13
-14
No files found.
playbooks/roles/demo/defaults/main.yml
View file @
a79fe1b7
...
...
@@ -22,17 +22,21 @@ demo_hashed_password: 'pbkdf2_sha256$20000$TjE34FJjc3vv$0B7GUmH8RwrOc/BvMoxjb5j8
demo_test_users
:
-
email
:
'
honor@example.com'
username
:
honor
mode
:
honor
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
-
email
:
'
audit@example.com'
username
:
audit
mode
:
audit
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
-
email
:
'
verified@example.com'
username
:
verified
mode
:
verified
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
demo_staff_user
:
email
:
'
staff@example.com'
username
:
staff
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
true
demo_edxapp_user
:
'
edxapp'
demo_edxapp_settings
:
'
{{
COMMON_EDXAPP_SETTINGS
}}'
demo_edxapp_venv_bin
:
'
{{
COMMON_APP_DIR
}}/{{
demo_edxapp_user
}}/venvs/{{demo_edxapp_user}}/bin'
...
...
playbooks/roles/demo/tasks/deploy.yml
View file @
a79fe1b7
...
...
@@ -16,34 +16,33 @@
become_user
:
"
{{
common_web_user
}}"
when
:
demo_checkout.changed
-
name
:
build staff and test user list
set_fact
:
demo_test_and_staff_users
:
"
{{
demo_test_users
+
[demo_staff_user]
}}"
when
:
DEMO_CREATE_STAFF_USER
-
name
:
build staff and test user list
set_fact
:
demo_test_and_staff_users
:
"
{{
demo_test_users
}}"
when
:
not DEMO_CREATE_STAFF_USER
-
name
:
create some test users
shell
:
"
{{
demo_edxapp_venv_bin
}}/python
./manage.py
lms
--settings={{
demo_edxapp_settings
}}
--service-variant
lms
manage_user
{{
item.username}}
{{
item.email
}}
--initial-password-hash
{{
item.hashed_password
|
quote
}}"
shell
:
"
{{
demo_edxapp_venv_bin
}}/python
./manage.py
lms
--settings={{
demo_edxapp_settings
}}
--service-variant
lms
manage_user
{{
item.username}}
{{
item.email
}}
--initial-password-hash
{{
item.hashed_password
|
quote
}}
{%
if
item.is_staff
%}
--staff{%
endif
%}
"
args
:
chdir
:
"
{{
demo_edxapp_code_dir
}}"
become_user
:
"
{{
common_web_user
}}"
with_items
:
"
{{
demo_test_users
}}"
with_items
:
"
{{
demo_test_
and_staff_
users
}}"
when
:
demo_checkout.changed
-
name
:
create staff user
shell
:
"
{{
demo_edxapp_venv_bin
}}/python
./manage.py
lms
--settings={{
demo_edxapp_settings
}}
--service-variant
lms
manage_user
staff
staff@example.com
--initial-password-hash
{{
demo_hashed_password
|
quote
}}
--staff"
args
:
chdir
:
"
{{
demo_edxapp_code_dir
}}"
become_user
:
"
{{
common_web_user
}}"
when
:
-
demo_checkout.changed
-
DEMO_CREATE_STAFF_USER
-
name
:
enroll test users in the demo course
shell
:
"
{{
demo_edxapp_venv_bin
}}/python
./manage.py
lms
--settings={{
demo_edxapp_settings
}}
--service-variant
lms
enroll_user_in_course
-e
{{
item.email
}}
-c
{{
demo_course_id
}}"
args
:
chdir
:
"
{{
demo_edxapp_code_dir
}}"
become_user
:
"
{{
common_web_user
}}"
with_items
:
-
"
{{
demo_test_users
}}"
-
{
email
:
'
staff@example.com'
}
-
"
{{
demo_test_and_staff_users
}}"
when
:
demo_checkout.changed
-
name
:
add test users to the certificate whitelist
shell
:
"
{{
demo_edxapp_venv_bin
}}/python
./manage.py
lms
--settings={{
demo_edxapp_settings
}}
--service-variant
lms
cert_whitelist
-a
{{
item.email
}}
-c
{{
demo_course_id
}}"
args
:
...
...
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