mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Move 19 roles into roles/0-DEPRECATED-ROLES
This commit is contained in:
parent
0e39c42bbd
commit
2218d2334b
124 changed files with 5 additions and 1 deletions
69
roles/0-DEPRECATED-ROLES/authserver/tasks/main.yml
Normal file
69
roles/0-DEPRECATED-ROLES/authserver/tasks/main.yml
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
- name: check pip is installed
|
||||
package: name=python-pip
|
||||
state=present
|
||||
|
||||
- name: Install xs-authserver from pypi
|
||||
pip: name=xs-authserver
|
||||
when: internet_available | bool
|
||||
|
||||
- name: install gunicorn
|
||||
package: name=python-gunicorn
|
||||
state=present
|
||||
|
||||
- name: Configure xs-authserver
|
||||
template: backup=yes
|
||||
src={{ item.src }}
|
||||
dest={{ item.dest }}
|
||||
owner=root
|
||||
group=root
|
||||
mode={{ item.mode }}
|
||||
with_items:
|
||||
- src: xs-authserver.env.j2
|
||||
dest: /etc/sysconfig/xs-authserver
|
||||
mode: 0644
|
||||
- src: xs-authserver.service.j2
|
||||
dest: /etc/systemd/system/xs-authserver.service
|
||||
mode: 0644
|
||||
|
||||
- name: create database folder
|
||||
file: state=directory
|
||||
path=/var/lib/xs-authserver/
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: init database
|
||||
command: xs-authserverctl initdb
|
||||
ignore_errors: yes
|
||||
environment:
|
||||
XS_AUTHSERVER_DATABASE: /var/lib/xs-authserver/data.db
|
||||
|
||||
- name: Stop authserver service
|
||||
service: name=xs-authserver
|
||||
state=stopped
|
||||
enabled=no
|
||||
when: not authserver_enabled
|
||||
|
||||
- name: Start xs-authserver service
|
||||
service: name=xs-authserver
|
||||
state=restarted
|
||||
enabled=yes
|
||||
when: authserver_enabled | bool
|
||||
|
||||
- name: Add 'authserver' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: authserver
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value | string }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: XS-authserver
|
||||
- option: description
|
||||
value: '"authserver (xs-authserver) implements a seamless web authentication
|
||||
service using XO laptop registration capabilities. It is heavily
|
||||
inspired by the Moodle OLPC-XS authentication plugin"'
|
||||
- option: port
|
||||
value: 5000
|
||||
- option: path
|
||||
value: /
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
XS_AUTHSERVER_OLPC_XS_DB='/home/idmgr/identity.db'
|
||||
XS_AUTHSERVER_DATABASE='/var/lib/xs-authserver/data.db'
|
||||
10
roles/0-DEPRECATED-ROLES/authserver/templates/xs-authserver.service.j2
Executable file
10
roles/0-DEPRECATED-ROLES/authserver/templates/xs-authserver.service.j2
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=XS authentication server
|
||||
After={{ apache_service }}.service local-fs.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/xs-authserver
|
||||
ExecStart=/usr/bin/gunicorn -n xs-authserver xs_authserver:app -b 0.0.0.0:5000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue