-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from ellisonbg/more-fixes
More fixes to get everything working again
- Loading branch information
Showing
10 changed files
with
69 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
--- | ||
|
||
- name: make sure base exists | ||
file: path={{nbgrader_base_dir}}/ state={{item}} owner={{nbgrader_owner}} mode=0700 | ||
file: path={{nbgrader_base_dir}}/ state={{item[0]}} owner={{item[1].nbgrader_owner}} mode=0700 | ||
become: true | ||
with_items: | ||
- directory | ||
- touch | ||
- ['directory', 'touch'] | ||
- "{{nbgrader_courses}}" | ||
|
||
- name: make sure subdirectories exist | ||
file: path={{nbgrader_base_dir}}/{{item}}/ state=directory owner={{nbgrader_owner}} mode=0700 | ||
file: path={{nbgrader_base_dir}}/{{item[0]}}/ state=directory owner={{item[1].nbgrader_owner}} mode=0700 | ||
become: true | ||
with_items: | ||
- source | ||
- release | ||
- feedback | ||
- autograded | ||
- submitted | ||
- ['source', 'release', 'feedback', 'autograded', 'submitted'] | ||
- "{{nbgrader_courses}}" | ||
|
||
- name: install nbgrader config file | ||
template: "src=nbgrader_config.py.j2 dest={{nbgrader_base_dir}}/nbgrader_config.py owner={{nbgrader_owner}} mode=700" | ||
template: "src=nbgrader_config.py.j2 dest={{nbgrader_base_dir}}/nbgrader_config.py owner={{item.nbgrader_owner}} mode=700" | ||
become: true | ||
with_items: | ||
- "{{nbgrader_courses}}" | ||
|
||
- name: install supervisor config for nbgrader | ||
template: "src=nbgrader.conf.j2 dest=/etc/supervisor/conf.d/nbgrader_{{nbgrader_course_id}}.conf owner=root group=root mode='0600' backup=yes" | ||
template: "src=nbgrader.conf.j2 dest=/etc/supervisor/conf.d/nbgrader_{{item.nbgrader_course_id}}.conf owner=root group=root mode='0600' backup=yes" | ||
become: true | ||
with_items: | ||
- "{{nbgrader_courses}}" | ||
|
||
- name: load nbgrader supervisor config | ||
supervisorctl: name=nbgrader_{{nbgrader_course_id}} state=present | ||
supervisorctl: name=nbgrader_{{item.nbgrader_course_id}} state=present | ||
become: true | ||
with_items: | ||
- "{{nbgrader_courses}}" | ||
|
||
- name: start nbgrader with supervisor | ||
supervisorctl: name=nbgrader_{{nbgrader_course_id}} state=restarted | ||
supervisorctl: name=nbgrader_{{item.nbgrader_course_id}} state=restarted | ||
become: true | ||
with_items: | ||
- "{{nbgrader_courses}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# {{ ansible_managed }} | ||
|
||
[program:nbgrader_{{nbgrader_course_id}}] | ||
[program:nbgrader_{{item.nbgrader_course_id}}] | ||
command=/opt/conda/bin/nbgrader formgrade | ||
redirect_stderr=true | ||
stdout_logfile={{nbgrader_log_dir}}/nbgrader_{{nbgrader_course_id}}.log | ||
stdout_logfile={{nbgrader_log_dir}}/nbgrader_{{item.nbgrader_course_id}}.log | ||
autostart=true | ||
autorestart=false | ||
stopasgroup=true | ||
user={{nbgrader_owner}} | ||
user={{item.nbgrader_owner}} | ||
directory={{nbgrader_base_dir}}/ | ||
environment=HOME="{{home_dir}}/{{nbgrader_owner}}",USER="{{nbgrader_owner}}",PATH="/opt/conda/bin:%(ENV_PATH)s" | ||
environment=HOME="{{home_dir}}/{{item.nbgrader_owner}}",USER="{{item.nbgrader_owner}}",PATH="/opt/conda/bin:%(ENV_PATH)s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters