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:
16
roles/seadrive/templates/seadrive.conf.j2
Normal file
16
roles/seadrive/templates/seadrive.conf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
[account]
|
||||
server = {{ item.server }}
|
||||
username = {{ item.login }}
|
||||
{% if item.token is defined %}
|
||||
token = {{ item.token }}
|
||||
{% else %}
|
||||
token = {{ seadrive_tokens.results | selectattr("item.id","equalto",item.id) | map(attribute="json.token") | first }}
|
||||
{% endif %}
|
||||
is_pro = false
|
||||
|
||||
[general]
|
||||
client_name = seadrive-{{ inventory_hostname }}
|
||||
|
||||
[cache]
|
||||
size_limit = {{ item.cache_size | default('2') }}GB
|
||||
clean_cache_interval = {{ item.cleanup_interval | default('10') }}
|
16
roles/seadrive/templates/seadrive.service.j2
Normal file
16
roles/seadrive/templates/seadrive.service.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Seafile virtual drive
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/seadrive -c /etc/seadrive/{{ item.id }}.conf -d {{ item.data_dir | default('/var/cache/seadrive/' + item.id) }} -o {{ item.fuse_opts | default(['allow_other']) | join(',') }} -f -l - {{ item.drive_dir }}
|
||||
ExecStopPost=/bin/fusermount -uz {{ item.drive_dir }}
|
||||
RestartSec=5
|
||||
User={{ item.user | default('root') }}
|
||||
MemoryLimit=1024M
|
||||
SyslogIdentifier=seadrive-{{ item.id }}
|
||||
Restart=always
|
||||
LimitNOFILE=100000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user