# create a schooltool user who can have limited capability
- name:Make a user for schooltool
user:name=schooltool
shell=/sbin/nologin
createhome=no
# create the permanent storage directory, and give world write access
# -- will eventually change the docker container to give itself write access and demote itself
- name:create Permanent Storage for persistent schooltool data
file:path=/var/lib/schooltool
state=directory
owner=schooltool
mode=0777
#Experience teaches that enabling schooltool is more likely to succeed after docker restart
- name:Restart docker
service:name=docker
state=restarted
enabled=yes
when:schooltool_enabled
- name:Enable schooltool
service:name=schooltool
state=started
enabled=yes
when:schooltool_enabled
- name:Disable schooltool
service:name=schooltool
state=stopped
enabled=no
when:not schooltool_enabled
- name:add schooltool to service list
ini_file:dest='{{ service_filelist }}'
section=schooltool
option='{{ item.option }}'
value='{{ item.value }}'
with_items:
- option:name
value:Schooltool
- option:description
value:'"SchoolTool is an open source, web based student information system designed for schools in the developing world, with strong support for translation, localization and automated deployment and updates."'