Ansible role for deploying Seafile mirror job https://src.mehl.mx/mxmehl/seafile-mirror
Go to file
Max Mehl 0926440161 make cron configurable 2024-11-18 10:45:10 +01:00
LICENSES make REUSE compliant 2023-05-26 11:18:38 +02:00
defaults make cron configurable 2024-11-18 10:45:10 +01:00
tasks make cron configurable 2024-11-18 10:45:10 +01:00
templates decrypt vaulted secrets 2023-05-26 11:18:38 +02:00
.gitmodules turn into installing seafile-mirror via pip(x) 2023-09-22 10:34:08 +02:00
README.md make cron configurable 2024-11-18 10:45:10 +01:00

README.md

Ansible role for deploying seafile-mirror

REUSE status

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