Ansible role for deploying Seafile mirror job https://src.mehl.mx/mxmehl/seafile-mirror
Max Mehl 0926440161 | ||
---|---|---|
LICENSES | ||
defaults | ||
tasks | ||
templates | ||
.gitmodules | ||
README.md |
README.md
Ansible role for deploying seafile-mirror
This role deploys Seafile Mirror and makes sure all requirements and systemd jobs are set up properly.
Requirements
Configure
Configuration is easiest by setting host/group variables. This is an example derived from the examplary configuration for seafile mirror:
seafile_local_user:
user: seafile
seafile_syncs:
- server: https://my-seafile-server.tld
user: user@example.com
password: mysecretpassword
# The default resync interval
resync_interval_days: 7
# Define the libraries which shall be synced
libs:
- name: Documents
# ID of the Seafile library (can be seen in the web UI)
id: 53976f13-9d24-4d4a-967b-efb598d542ea
# local directory where the mirror shall be created
dir: /backup/Documents
- name: Pictures
id: 12346f13-9d24-4d4a-1234-efb598d555fa
dir: /backup/Pictures
# A library-specific resync interval
resync_interval_days: 31
seafile_cron:
minute: "20"
hour: "23"
day: "*"
month: "*"
weekday: "*"
Run in playbook
Here is an example for a playbook:
- name: Set up machines
remote_user: root
tasks:
- name: Setup Seafile
include_role:
name: seafile
apply:
# Execute tasks as user by default
become: true
become_user: "{{ seafile_local_user.user }}"
License
Apache-2.0, Copyright Max Mehl