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
OpenEdx
configuration
Commits
83af25f7
Commit
83af25f7
authored
Jul 12, 2017
by
Shirley He
Committed by
GitHub
Jul 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3952 from edx/shrlyhe/ENT-433
ENT-433: Provision a default admin user for developer environments
parents
e07af8d2
9eeab783
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
playbooks/edx-east/manage_edxapp_users_and_groups.yml
+1
-2
playbooks/roles/common_vars/defaults/main.yml
+3
-0
playbooks/roles/demo/defaults/main.yml
+4
-0
playbooks/roles/demo/tasks/deploy.yml
+12
-2
No files found.
playbooks/edx-east/manage_edxapp_users_and_groups.yml
View file @
83af25f7
...
...
@@ -10,7 +10,7 @@
#
# Overview:
# This playbook ensures that the specified users and groups exist in the targeted
# edxapp cluster.
# edxapp cluster.
#
# Users have the following properties:
# - username (required, str)
...
...
@@ -72,7 +72,6 @@
# for perm in Permission.objects.all():
# print '{}:{}:{}'.format(perm.content_type.app_label, perm.content_type.model, perm.codename)
#
-
hosts
:
all
vars
:
python_path
:
/edx/bin/python.edxapp
...
...
playbooks/roles/common_vars/defaults/main.yml
View file @
83af25f7
...
...
@@ -220,3 +220,6 @@ COMMON_OIDC_ISSUER: '{{ COMMON_OAUTH_URL_ROOT }}'
COMMON_JWT_AUDIENCE
:
'
SET-ME-PLEASE'
COMMON_JWT_ISSUER
:
'
{{
COMMON_OIDC_ISSUER
}}'
COMMON_JWT_SECRET_KEY
:
'
SET-ME-PLEASE'
# Set sandbox admin default
SANDBOX_CREATE_ADMIN_USER
:
True
playbooks/roles/demo/defaults/main.yml
View file @
83af25f7
...
...
@@ -24,19 +24,23 @@ demo_test_users:
username
:
honor
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
is_superuser
:
false
-
email
:
'
audit@example.com'
username
:
audit
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
is_superuser
:
false
-
email
:
'
verified@example.com'
username
:
verified
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
false
is_superuser
:
false
demo_staff_user
:
email
:
'
staff@example.com'
username
:
staff
hashed_password
:
"
{{
demo_hashed_password
}}"
is_staff
:
true
is_superuser
:
false
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 @
83af25f7
...
...
@@ -26,12 +26,22 @@
demo_test_and_staff_users
:
"
{{
demo_test_users
}}"
when
:
not DEMO_CREATE_STAFF_USER
-
name
:
build staff, admin, and test user list
set_fact
:
demo_test_admin_and_staff_users
:
"
{{
demo_test_and_staff_users
+
[SANDBOX_EDXAPP_USERS]
}}"
when
:
SANDBOX_CREATE_ADMIN_USER
-
name
:
build staff, admin, and test user list
set_fact
:
demo_test_admin_and_staff_users
:
"
{{
demo_test_and_staff_users
}}"
when
:
not SANDBOX_CREATE_ADMIN_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
}}{%
if
item.is_staff
%}
--staff{%
endif
%}"
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
%}
{%
if
item.is_superuser
%}
--superuser{%
endif
%}
"
args
:
chdir
:
"
{{
demo_edxapp_code_dir
}}"
become_user
:
"
{{
common_web_user
}}"
with_items
:
"
{{
demo_test_and_staff_users
}}"
with_items
:
"
{{
demo_test_a
dmin_a
nd_staff_users
}}"
when
:
demo_checkout.changed
-
name
:
enroll test users in the demo course
...
...
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