diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-08-04 23:33:30 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-08-04 23:43:26 +0200 |
commit | 51b3e309776277f6c33107f5fc3a062842d8a8d6 (patch) | |
tree | f3acc9dc9ec96bf256788ee64c14a9e040d6fedd | |
parent | Add cors headers to shiori. (diff) | |
download | profiles-51b3e309776277f6c33107f5fc3a062842d8a8d6.tar.gz profiles-51b3e309776277f6c33107f5fc3a062842d8a8d6.tar.xz |
Add basic pgadmin profile.
-rw-r--r-- | manifests/pgadmin.pp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/manifests/pgadmin.pp b/manifests/pgadmin.pp new file mode 100644 index 0000000..e7f842a --- /dev/null +++ b/manifests/pgadmin.pp @@ -0,0 +1,39 @@ +class profiles::pgadmin ( + String $server_name = "pgadmin.${fqdn}", +) { + + ensure_packages(['pgadmin4']) + + uwsgi::vassal { 'pgAdmin': + path => '/usr/lib/pgadmin4/web/pgAdmin4.wsgi', + } + + include ::nginx + + nginx::resource::server { $server_name: + ipv6_enable => true, + ipv6_listen_options => '', + ssl => false, + use_default_location => false, + } + + nginx::resource::location { 'pgadmin /': + server => $server_name, + location => '/', + location_allow => [ + '127.0.0.1', + '::1', + "${facts['network6']}/${extlib::netmask_to_cidr($facts['netmask6'])}", + "${facts['network']}/${extlib::netmask_to_cidr($facts['netmask'])}", + ], + location_deny => [ 'all' ], + # TODO centralize this setting + uwsgi => '/run/uwsgi/emperor.sock', + } + + # file { '/etc/pgadmin/config_system.py': + # content => @("EOF") + # SQLITE_PATH = ${sqlite_path} + # | EOF + # } +} |