mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
5
roles/unifi/templates/filebeat.yml.j2
Normal file
5
roles/unifi/templates/filebeat.yml.j2
Normal file
@@ -0,0 +1,5 @@
|
||||
- type: log
|
||||
enabled: True
|
||||
paths:
|
||||
- {{ unifi_root_dir }}/app/logs/*.log
|
||||
exclude_files: ['\.\d+$']
|
3
roles/unifi/templates/post-backup.sh.j2
Normal file
3
roles/unifi/templates/post-backup.sh.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf {{ unifi_root_dir }}/backup/mongo/*
|
6
roles/unifi/templates/pre-backup.sh.j2
Normal file
6
roles/unifi/templates/pre-backup.sh.j2
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
mkdir -p {{ unifi_root_dir }}/backup/mongo
|
||||
mongodump --quiet --port 27117 --out {{ unifi_root_dir }}/backup/mongo
|
10
roles/unifi/templates/system.properties.j2
Normal file
10
roles/unifi/templates/system.properties.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
unifi.xmx={{ unifi_mem_limit }}
|
||||
unifi.xms={{ unifi_mem_limit }}
|
||||
unifi.G1GC.enabled=true
|
||||
autobackup.dir={{ unifi_root_dir }}/backup
|
||||
unifi.http.port={{ unifi_http_port }}
|
||||
unifi.https.port={{ unifi_https_port }}
|
||||
portal.http.port={{ unifi_portal_http_port }}
|
||||
portal.https.port={{ unifi_portal_https_port }}
|
||||
is_default=false
|
||||
uuid={{ inventory_hostname | to_uuid }}
|
21
roles/unifi/templates/unifi.service.j2
Normal file
21
roles/unifi/templates/unifi.service.j2
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Ubiquiti's UniFi Controller
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=unifi
|
||||
WorkingDirectory={{ unifi_root_dir }}/app
|
||||
ExecStart=/usr/bin/java -Djava.awt.headless=true -Xmx{{ unifi_mem_limit }}M -Xms{{ unifi_mem_limit }}M -Djava.net.preferIPv4Stack=true {% if system_proxy is defined and system_proxy != '' %}-Dhttp.proxyHost={{ system_proxy | urlsplit('hostname') }} -Dhttp.proxyPort={{ system_proxy | urlsplit('port') }} -Dhttps.proxyHost={{ system_proxy | urlsplit('hostname') }} -Dhttps.proxyPort={{ system_proxy | urlsplit('port') }} {% endif %}-jar {{ unifi_root_dir }}/app/lib/ace.jar start
|
||||
ExecStop=/usr/bin/java -jar {{ unifi_root_dir }}/app/lib/ace.jar stop
|
||||
SuccessExitStatus=143
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
MemoryLimit={{ unifi_mem_limit * 2 }}M
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user