l3d.etebase

EteBase Ansible Role - EteSync 2.0 Server Backend

This Ansible role helps set up and configure Etebase, the backend for EteSync version 2.0. You can find the source code at GitHub.

Overview

This role installs and configures Etebase, which allows you to securely sync your contacts, calendars, tasks, and notes. It creates a separate user for Etebase, downloads the latest version of Etebase to the user's home directory, sets up the configuration, and installs necessary Python dependencies in a virtual environment. Optionally, you can start Etebase automatically using systemd and uvicorn.

Please note that this role does not create users in Etebase or web server configurations. You can find more details in the Additional Information section.

Default Variables

Here are some default variables used in the role:

Variable Value Description
etebase__user etebase Name of the Unix user for Etebase
etebase__group etebase Name of the Unix group for Etebase
etebase__user_home /var/lib/etebase Home directory for the Etebase user
etebase__shell /bin/false Default shell for the Etebase user
etebase__venv_path {{ etebase__user_home }}/venv Path to the Etebase virtual environment
etebase__socket /tmp/etebase_server.sock Socket path for Etebase (if using systemd)
etebase__package_state present Set to latest to upgrade required packages
etebase__version latest Etebase version tag
etebase__secrets_dir {{ etebase__user_home }}/secrets Directory to store Etebase secrets
etebase__collectstatic true Generate static files for Etebase
etebase__restart_webserver false Set to true to restart the web server on config change (requires systemd setup)
etebase__webserver_service nginx.service Systemd service to restart for the web server
etebase__systemd_setup false Set to true to run Etebase as a systemd unit
etebase__create_backup false Should a backup be created before upgrading Etebase?
etebase__backup_destination {{ etebase__user_home }}/backup Directory for backup
etebase__backup_sqlite true Skip backing up the sqlite3 database if set to false
submodules_versioncheck false Perform a simple version check for this role

Options for etebase-server.ini

These options help configure Etebase’s settings:

Variable Value Description
etebase__global_secret_file {{ etebase__secrets_dir }}/secret.txt Path to the secret file
etebase__global_debug false Enable debugging (set to true)
etebase__global_static_root {{ etebase__user_home }}/static_root Path for static files
etebase__global_media_root {{ etebase__user_home }}/media_root Path for media files
etebase__global_extra Extra parameters for the [global] section
etebase__allowed_hosts_allowed_host1 * Host allowed for this Etebase server
etebase__allowed_hosts_extra Extra parameters for the [allowed_hosts] section
etebase__database_engine django.db.backends.sqlite3 Database engine type
etebase__database_name {{ etebase__secrets_dir }}/etebase.db.sqlite3 Path to the SQLite database
etebase__database_extra Extra parameters for the [database] section
etebase__database_options_extra Extra parameters for the [database_options] section
etebase__ldap_extra Extra parameters for the [ldap] section
etebase__config_extra Extra parameters at end of config file

Additional Information

For more about web server configuration, check Production setup using Nginx. Keep note of the value used for the etebase__socket variable if you start the uvicorn ASGI server using systemd (requires setting etebase__systemd_setup to true).

You need to create an admin user manually. Log in as a privileged user, navigate to etebase__user_home, enter the downloaded Etebase code directory, and run the following command in the virtual environment:

# Go to Etebase home
cd /var/lib/etebase/

# Move to the latest Etebase version
ls -l etebase_*
cd etebase_v0.10.0  # example version

# Activate the virtual environment
ls -l /var/lib/etebase/venv
source /var/lib/etebase/venv/v0.10.0/bin/activate  # example version

# Create new superuser
python3 ./manage.py createsuperuser

Make sure that the Ansible user has permission to run commands with sudo.

Example Playbook

Here is a sample playbook to install Etebase on example.com:

---
- name: Install Etebase server at example.com
  hosts: example.com
  roles:
    - {role: do1jlr.etebase, tags: etebase}
  vars:
    etebase__allowed_hosts_allowed_host1: 'example.com'
    etebase__systemd_setup: true
    submodules_versioncheck: true

Requirements

You need the community.general collection for some parts of this role. Install it with the following command:

ansible-galaxy collection install -r requirements.yml --upgrade

Contributing

Feel free to open an issue or create a pull request if you have suggestions or improvements!

Informazioni sul progetto

Ansible role to Setup and Confugure Etebase - The Backend from EteSync 2.0.

Installa
ansible-galaxy install l3d.etebase
Licenza
mit
Download
654
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy