Getting started

Example inventory

To configure EteSync on a given remote host, it needs to be added to the [debops_service_etesync] Ansible inventory group:

[debops_service_etesync]
hostname

Example playbook

Here's an example playbook that can be used to manage EteSync:

---

- name: Deploy and manage the EteSync server
  collections: [ 'debops.debops' ]
  hosts: [ 'debops_service_etesync' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: keyring
      tags: [ 'role::keyring', 'skip::keyring',
              'role::nginx', 'role::etesync' ]
      keyring__dependent_apt_keys:
        - '{{ nginx__keyring__dependent_apt_keys }}'
      keyring__dependent_gpg_keys:
        - '{{ etesync__keyring__dependent_gpg_keys }}'

    - role: apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ gunicorn__apt_preferences__dependent_list }}'
        - '{{ nginx__apt_preferences__dependent_list }}'

    - role: cron
      tags: [ 'role::cron', 'skip::cron' ]

    - role: logrotate
      tags: [ 'role::logrotate', 'skip::logrotate' ]
      logrotate__dependent_config:
        - '{{ gunicorn__logrotate__dependent_config }}'

    - role: ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'

    - role: python
      tags: [ 'role::python', 'skip::python', 'role::gunicorn', 'role::etesync' ]
      python__dependent_packages3:
        - '{{ gunicorn__python__dependent_packages3 }}'
        - '{{ nginx__python__dependent_packages3 }}'
        - '{{ etesync__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ gunicorn__python__dependent_packages2 }}'
        - '{{ nginx__python__dependent_packages2 }}'

    - role: gunicorn
      tags: [ 'role::gunicorn', 'skip::gunicorn' ]
      gunicorn__dependent_applications:
        - '{{ etesync__gunicorn__dependent_applications }}'

    - role: nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_upstreams:
        - '{{ etesync__nginx__dependent_upstreams }}'
      nginx__dependent_servers:
        - '{{ etesync__nginx__dependent_servers }}'

    - role: etesync
      tags: [ 'role::etesync', 'skip::etesync' ]

Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after a host was first configured to speed up playbook execution, when you are sure that most of the configuration is already in the desired state.

Available role tags:

role::etesync

Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.

role::etesync:config

Run tasks related to EteSync configuration.

role::etesync:show_url

Print URL entry point if EteSync is deployed on a subpath.