Commit 457f823 1 parent 9730dd3 commit 457f823 Copy full SHA for 457f823
File tree 4 files changed +32
-0
lines changed
4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ - Role: edxapp
2
+ - Added creation of enterprise_worker user to provisioning. This user is used by the edx-enterprise package when making API requests to Open edX IDAs.
3
+
1
4
- Role: neo4j
2
5
- Increase heap and page caches sizes for neo4j
3
6
Original file line number Diff line number Diff line change @@ -221,3 +221,5 @@ COMMON_JWT_AUDIENCE: 'SET-ME-PLEASE'
221
221
COMMON_JWT_ISSUER : ' {{ COMMON_OIDC_ISSUER }}'
222
222
COMMON_JWT_SECRET_KEY : ' SET-ME-PLEASE'
223
223
224
+ # Set worker user default
225
+ CREATE_SERVICE_WORKER_USERS : True
Original file line number Diff line number Diff line change @@ -693,6 +693,7 @@ EDXAPP_BLOCK_STRUCTURES_SETTINGS:
693
693
# Configuration settings needed for the LMS to communicate with the Enterprise service.
694
694
EDXAPP_ENTERPRISE_API_URL : " {{ EDXAPP_LMS_ROOT_URL }}/enterprise/api/v1"
695
695
696
+ EDXAPP_ENTERPRISE_SERVICE_WORKER_EMAIL :
" [email protected] "
696
697
EDXAPP_ENTERPRISE_SERVICE_WORKER_USERNAME : " enterprise_worker"
697
698
698
699
EDXAPP_ENTERPRISE_COURSE_ENROLLMENT_AUDIT_MODES :
@@ -1304,3 +1305,10 @@ edxapp_cms_variant: cms
1304
1305
1305
1306
# Worker Settings
1306
1307
worker_django_settings_module : ' {{ EDXAPP_SETTINGS }}'
1308
+
1309
+ # Add default service worker users
1310
+ SERVICE_WORKER_USERS :
1311
+ - email : " {{ EDXAPP_ENTERPRISE_SERVICE_WORKER_EMAIL }}"
1312
+ username : " {{ EDXAPP_ENTERPRISE_SERVICE_WORKER_USERNAME }}"
1313
+ is_staff : true
1314
+ is_superuser : false
Original file line number Diff line number Diff line change 417
417
become_user : " {{ common_web_user }}"
418
418
tags :
419
419
- manage
420
+
421
+ - name : build service worker users list
422
+ set_fact :
423
+ service_worker_users : " {{ [SERVICE_WORKER_USERS] }}"
424
+ when : CREATE_SERVICE_WORKER_USERS
425
+ tags :
426
+ - manage
427
+ - manage:db
428
+
429
+ - name : create service worker users
430
+ shell : " {{ edxapp_venv_bin }}/python ./manage.py lms --settings={{ edxapp_settings }} --service-variant lms manage_user {{ item.username}} {{ item.email }} --unusable-password {% if item.is_staff %} --staff{% endif %}"
431
+ args :
432
+ chdir : " {{ edxapp_code_dir }}"
433
+ become_user : " {{ common_web_user }}"
434
+ with_items : " {{ service_worker_users }}"
435
+ when : CREATE_SERVICE_WORKER_USERS
436
+ tags :
437
+ - manage
438
+ - manage:db
You can’t perform that action at this time.
0 commit comments