initial ansible code

This commit is contained in:
Oli
2022-10-09 21:41:56 +00:00
parent 4a64eab4a0
commit feaec34dd2
103 changed files with 4473 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
## Managed by Ansible ##
[Unit]
Description = rclone crypt mount {{ nextcloud_rclone_mount_dir }}
After = network-online.target
[Service]
Environment=RCLONE_RCD_USER=rclone
Environment=RCLONE_RCD_PASSWORD={{ vault_rclone_rcd_pass }}
Type=notify
ExecStart=/usr/bin/rclone mount GD3_crypt:cloud_data {{ nextcloud_rclone_mount_dir }} \
--devname rclone \
--use-mmap \
--allow-other \
--uid {{ created_rclone_user.uid }} \
--gid {{ created_rclone_group.gid }} \
--umask 002 \
--dir-perms 775 \
--file-perms 664 \
--dir-cache-time 8760h \
--poll-interval 1h \
--buffer-size 32M \
--drive-chunk-size 256M \
--drive-pacer-min-sleep 10ms \
--drive-pacer-burst 1000 \
--vfs-cache-max-age 720h \
--vfs-cache-mode full \
--vfs-cache-max-size 100G \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--vfs-write-back 20s \
--cache-dir={{ rclone_cache_dir }} \
--log-file={{ rclone_log_dir }}/mount_nextcloud.log \
--log-level=INFO \
--rc \
--rc-addr "0.0.0.0:5572" \
--rc-enable-metrics \
--rc-user $RCLONE_RCD_USER \
--rc-pass $RCLONE_RCD_PASSWORD \
--user-agent "{{ rclone_user_agent_gd }}"
ExecStop=/bin/fusermount -u -z {{ nextcloud_rclone_mount_dir }}
Restart=on-failure
RestartSec=20s
User=root
[Install]
WantedBy=multi-user.target