diff --git a/README.md b/README.md new file mode 100644 index 0000000..18cf20a --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ + + +# Ansible role for deploying seafile-mirror + +[![REUSE status](https://api.reuse.software/badge/src.mehl.mx/mxmehl/seafile-mirror-ansible)](https://api.reuse.software/info/src.mehl.mx/mxmehl/seafile-mirror-ansible) + +This role deploys [Seafile Mirror](https://src.mehl.mx/mxmehl/seafile-mirror) +and makes sure all requirements and systemd jobs are set up properly. + +## Requirements + +* [ansible-role-users](https://src.mehl.mx/mxmehl/ansible-role-users) + +## Configure + +Configuration is easiest by setting host/group variables. This is an example +derived from the [examplary configuration for seafile +mirror](https://src.mehl.mx/mxmehl/seafile-mirror/src/branch/main/examples/seafile_mirror.conf.yaml): + +```yaml +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 +``` + +## Run in playbook + +Here is an example for a playbook: + +```yaml +- 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