Skip to content
Snippets Groups Projects
Commit 86f26e73 authored by Thomas Schneider's avatar Thomas Schneider Committed by Lars Beckers
Browse files

Add pgadmin4 webapp config

parent fa95c6ae
No related branches found
No related tags found
1 merge request!4WIP: add acmebot role
Pipeline #1835 failed
Package: *
Pin: release o=apt.postgresql.org
Pin-Priority: 200
......@@ -113,3 +113,6 @@
- name: restart uwsgi instance gl-rt-bridge
service: name="uwsgi@gl-rt-bridge" state=restarted
- name: restart uwsgi instance pgadmin4
service: name="uwsgi@pgadmin4" state=restarted
......@@ -175,6 +175,7 @@
- app_deploy_key is defined
- app_deploy_key|string != '' # noqa 602
- (app_git_pip is not defined) or (not app_git_pip)
- app_git_url|string != '' # noqa 602
register: git
tags:
- uwsgi-app
......@@ -194,6 +195,7 @@
# yamllint disable-line rule:line-length
- (app_deploy_key is not defined) or (not app_deploy_key|string != '') # noqa 602
- (app_git_pip is not defined) or (not app_git_pip)
- app_git_url|string != '' # noqa 602
register: git
tags:
- uwsgi-app
......@@ -247,7 +249,7 @@
- "{{ app_path }}/vendor"
when:
- app_gemfile is defined
- app_gemfile|string != ''
- app_gemfile|string != '' # noqa 602
- app_lang == "ruby"
tags:
- uwsgi-app
......@@ -264,7 +266,7 @@
become_user: "{{ app_user }}"
when:
- app_gemfile is defined
- app_gemfile|string != ''
- app_gemfile|string != '' # noqa 602
- app_lang == "ruby"
tags:
- uwsgi-app
......
---
- name: Add the Postgres APT repo signing key
apt_key:
url: "https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc"
id: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
- name: Pin Postgres APT repo
copy:
src: pgdg.pref
dest: /etc/apt/preferences.d/pgdg.pref
- name: Enable Postgres APT repository
apt_repository:
# yamllint disable-line rule:line-length
repo: "deb https://apt.postgresql.org/pub/repos/apt/ {{ debian_version }}-pgdg main"
- name: Debconf pgadmin4
debconf:
pkg: pgadmin4-apache2
question: "pgadmin4/{{ item.k }}"
value: "{{ item.v }}"
vtype: "{{ item.t }}"
loop:
- {k: password, v: "{{ pgadmin4_admin_password }}", t: password}
- {k: email, v: "{{ pgadmin4_admin_email }}", t: string}
- name: Install pgAdmin4
apt:
# In contrast to the name, this is the general WSGI package
# It does not depend hard on apache2, but rather on any wsgi webserver
name: pgadmin4-apache2
- name: Install newer version of python3-flaskext.wtf
apt:
name: python3-flaskext.wtf
default_release: stretch-pgdg
when: debian_version == "stretch"
- name: Fix directory permissions
file:
path: "{{ item }}"
state: directory
owner: "{{ app_user }}"
recurse: true
---
app_home: /var/lib/pgadmin
app_path: /usr/share/pgadmin4/web
app_program: pgAdmin4.wsgi
app_callable: application
app_mountpoint: /pgadmin4
app_workers: 1
app_enable_threads: true
app_uwsgi_options:
- "threads = 25"
app_db_type: sqlite
app_secret_config: false
app_config_file: ""
app_requirements_file: ""
app_venv: ""
app_deploy_key: ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment