This commit is contained in:
Emmanuel Cazenave 2018-05-18 10:30:47 +02:00
parent 9917bc3d50
commit fc810e2e7d
6 changed files with 62 additions and 0 deletions

View File

@ -11,6 +11,7 @@
- fargo
- chrono
- corbo
- bijoe
- hobo-agent
- end
vars:

View File

@ -55,6 +55,12 @@ local:
nginx_host_pattern: '~^(.*)\-corbo\.local\.publik$'
project_name: corbo
server_port: 8044
bijoe:
db_name: bijoe
host_pattern: "*-bijoe.local.publik"
nginx_host_pattern: '~^(.*)\-bijoe\.local\.publik$'
project_name: bijoe
server_port: 8048
wcs:
db_name: wcs
host_pattern: "*-wcs.local.publik"
@ -71,3 +77,4 @@ local:
dev-fargo: "dev-fargo.local.publik"
dev-chrono: "dev-chrono.local.publik"
dev-corbo: "dev-corbo.local.publik"
dev-bijoe: "dev-bijoe.local.publik"

View File

@ -0,0 +1,26 @@
{% extends "app-settings-base.j2" %}
{% block app_custom_before %}
# SAML2 authentication
INSTALLED_APPS += ('mellon',)
{% endblock %}
{% block app_custom_after %}
AUTHENTICATION_BACKENDS = ('mellon.backends.SAMLBackend',)
MELLON_ATTRIBUTE_MAPPING = {
'email': '{attributes[email][0]}',
'first_name': '{attributes[first_name][0]}',
'last_name': '{attributes[last_name][0]}',
}
MELLON_SUPERUSER_MAPPING = {
'is_superuser': 'true',
}
MELLON_USERNAME_TEMPLATE = '{attributes[name_id_content]}'
MELLON_IDENTITY_PROVIDERS = []
# Override default hobo agent
INSTALLED_APPS = ('bijoe.hobo_agent',) + INSTALLED_APPS
{% endblock %}

View File

@ -0,0 +1,14 @@
- name: source install bijoe
import_tasks: install_source.yml
vars:
repo: "bijoe"
repo_dir: "{{ src_dir }}/bijoe"
- name: bijoe app setup
import_role:
name: app-setup
- name: bijoe nginx setup
import_role:
name: nginx-setup

10
roles/bijoe/vars/main.yml Normal file
View File

@ -0,0 +1,10 @@
app_name: bijoe
compile_scss: false
compile_translations: true
db_name: "{{apps['bijoe']['db_name']}}"
manage_cmd: "{{venv_python}} {{src_dir}}/bijoe/manage.py"
nginx_host_pattern: "{{apps['bijoe']['nginx_host_pattern']}}"
nginx_template_name: "std-nginx-server.j2"
project_name: "{{apps['bijoe']['project_name']}}"
server_port: "{{apps['bijoe']['server_port']}}"
settings_env_var: BIJOE_SETTINGS_FILE

View File

@ -50,6 +50,10 @@
"url": "https://{{tenants_conf['dev-corbo']}}/",
"title": "Annonces"
}},
{"create-bijoe": {
"url": "https://{{tenants_conf['dev-bijoe']}}/",
"title": "Statistiques"
}},
{"set-theme": {
"theme": "publik"
}}