mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2022-02-18 16:00
This commit is contained in:
18
roles/pgweb/templates/bookmark.toml.j2
Normal file
18
roles/pgweb/templates/bookmark.toml.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
{% if item.url is defined %}
|
||||
url = "{{ item.url }}"
|
||||
{% else %}
|
||||
host = "{{ item.host }}"
|
||||
database = "{{ item.database }}"
|
||||
{% if item.port is defined %}
|
||||
port = {{ item.port }}
|
||||
{% endif %}
|
||||
{% if item.user is defined %}
|
||||
user = "{{ item.user }}"
|
||||
{% endif %}
|
||||
{% if item.pass is defined %}
|
||||
password = "{{ item.pass }}"
|
||||
{% endif %}
|
||||
{% if item.ssl is defined %}
|
||||
ssl = "{{ item.ssl }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
34
roles/pgweb/templates/pgweb.service.j2
Normal file
34
roles/pgweb/templates/pgweb.service.j2
Normal file
@@ -0,0 +1,34 @@
|
||||
[Unit]
|
||||
Description=PgWeb Postgres Browser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ pgweb_user }}
|
||||
Group={{ pgweb_user }}
|
||||
ExecStart={{ pgweb_root_dir }}/bin/pgweb \
|
||||
--listen {{ pgweb_port }} \
|
||||
--bind {{ (pgweb_src_ip | length > 0) | ternary('0.0.0.0','127.0.0.1') }} \
|
||||
--bookmarks-dir={{ pgweb_bookmarks_dir }} \
|
||||
{% if not pgweb_ssh_tunnels %}
|
||||
--no-ssh \
|
||||
{% endif %}
|
||||
--sessions
|
||||
RuntimeDirectory=pgweb
|
||||
RestartSec=30
|
||||
Restart=always
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectSystem=strict
|
||||
RestrictRealtime=true
|
||||
RestrictNamespaces=yes
|
||||
ReadWritePaths=/run
|
||||
PrivateTmp=true
|
||||
MemoryDenyWriteExecute=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user