change-enrollment.sh 483 Bytes
Newer Older
Edward Zarecor committed
1 2
#!/bin/bash

Han Su Kim committed
3 4 5 6
cd configuration
pip install -r requirements.txt
env

Edward Zarecor committed
7
ansible="ansible -v first_in_tag_Name_${environment}-${deployment}-worker -i playbooks/ec2.py -u ubuntu -s -U www-data -m shell -a"
Edward Zarecor committed
8
manage="cd /edx/app/edxapp/edx-platform && /edx/bin/python.edxapp /edx/bin/manage.edxapp lms change_enrollment --settings=aws"
Edward Zarecor committed
9
noop_switch=""
Han Su Kim committed
10

11
if [ "$noop" = true ]; then
Edward Zarecor committed
12
  noop_switch="--noop"  
Han Su Kim committed
13
fi
14

Edward Zarecor committed
15
$ansible "$manage $noop_switch --course $course --user $name --to $to --from $from"