Skip to content
Snippets Groups Projects
Commit 4ba61653 authored by Lars Beckers's avatar Lars Beckers
Browse files

uwsgi-python: add infoscreen software

parent b456d982
Branches
No related tags found
No related merge requests found
......@@ -100,3 +100,6 @@
service: name="pretix-celery" state=restarted
listen: "restart uwsgi instance pretix"
- name: restart uwsgi instance infoscreen
service: name="uwsgi@infoscreen" state=restarted
---
# https://github.com/ansible/ansible/issues/42983
- name: ensure there exists a .ansible folder
file:
path: "{{app_path}}/.ansible"
state: directory
owner: "{{app_user}}"
group: "{{app_group}}"
- name: ensure data model upgrades are applied
command: "{{app_venv}}/bin/python {{app_path}}/createdb.py"
args:
chdir: "{{app_path}}"
become: true
become_user: "{{app_user}}"
notify:
- "restart uwsgi instance {{app.instance}}"
- name: ensure the folder from above is not present anymore
file:
path: "{{app_path}}/.ansible"
state: absent
- name: ensure some directories are present
file:
state: directory
path: "{{ app_path }}/{{ item }}"
mode: '0755'
owner: "{{ app_user }}"
group: "{{ app_group }}"
with_items:
- display
- tmp
- uploads
from secret_config import secret_key as SECRET_KEY
SQLALCHEMY_DATABASE_URI = 'postgresql://{{ app_user }}:@/{{ app_db_name }}'
DEBUG = False
SESSION_COOKIE_SECURE = True
import datetime
REMEMBER_COOKIE_NAME = 'remember_token'
REMEMBER_COOKIE_DURATION = datetime.timedelta(30)
REMEMBER_COOKIE_DOMAIN = None
REMEMBER_COOKIE_PATH = '/'
REMEMBER_COOKIE_SECURE = True
REMEMBER_COOKIE_HTTPONLY = True
USER_GROUP = '{{ infoscreen_user_group }}'
AD_HOST = '{{ infoscreen_ad_host }}'
AD_DOMAIN = '{{ infoscreen_ad_domain }}'
AD_USER_DN = '{{ infoscreen_ad_user_dn }}'
AD_GROUP_DN = '{{ infoscreen_ad_group_dn }}'
AD_CA_CERT = '{{ infoscreen_ad_cert }}'
BRANDING_NAME = '{{ infoscreen_branding_name }}'
BRANDING_CONTACT = '{{ infoscreen_branding_contact }}'
TMP_DIR = '{{ infoscreen_tmp_dir }}'
UPLOAD_DIR = '{{ infoscreen_upload_dir }}'
REMOTE_UPLOAD = '{{ infoscreen_remote_upload }}'
{% if infoscreen_remote_verify is string %}
REMOTE_VERIFY = '{{ infoscreen_remote_verify }}'
{% elif infoscreen_remote_verify %}
REMOTE_VERIFY = True
{% else %}
REMOTE_VERIFY = False
{% endif %}
---
app_name: infoscreen
app_user: infoscreen
app_group: infoscreen
app_home: /var/www/infoscreen
app_path: /var/www/infoscreen
app_python_version: 3
app_venv: /var/www/infoscreen/venv
app_program: infoscreen.py
app_callable: app
app_command: ""
app_mountpoint: /
app_service_env: []
app_mules: 0
app_enable_threads: false
app_harakiri: 5
app_uwsgi_options: []
app_db_name: infoscreen
app_db_type: postgres
app_additional_software: []
app_deploy_key: "{{ inventory_dir }}/files/deploy-keys/infoscreen"
app_git_url: "git@git.stud.rwth-aachen.de:infra/infoscreen.git"
app_git_version: HEAD
app_requirements_file: requirements.txt
app_config_file: config.py
app_secret_config: true
app_secret_config_keys: []
infoscreen_user_group: users
infoscreen_ad_host: 'ad.example.com'
infoscreen_ad_domain: 'EXAMPLE'
infoscreen_ad_user_dn: "cn=users,dc=example,dc=com"
infoscreen_ad_group_dn: "cn=users,dc=example,dc=com"
infoscreen_ad_cert: "/etc/ssl/certs/example_cacert.pem"
infoscreen_branding_name: 'Example'
infoscreen_branding_contact: 'contact@example.com'
infoscreen_tmp_dir: '/var/www/infoscreen/tmp'
infoscreen_upload_dir: '/var/www/infoscreen/uploads'
infoscreen_remote_verify: false
infoscreen_remote_upload: 'http://infoscreen/upload/'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment