systemli.prosody

ansible-role-prosody

Build Status Ansible Galaxy

This Ansible role helps you install and manage Prosody from its official repository. It has been tested using Molecule, Docker, and Vagrant.

Requirements

You need Debian 11. Other versions of Debian/Ubuntu may work, but they haven't been tested.

Role Variables

Check defaults/main.yml for the variables you can use.

Dependencies

You need the following role as a dependency:

Download

To download the latest version, use ansible-galaxy:

ansible-galaxy install systemli.prosody

Example Playbook

Here is an example of how to use the role in a playbook:

- hosts: servers
  roles:
    - systemli.prosody
  vars:
    prosody_virtual_hosts:
      - name: example.net
        key: |
          -----BEGIN PRIVATE KEY-----
            ...
          -----END PRIVATE KEY-----
        cert: |
            -----BEGIN CERTIFICATE-----
              ...
            -----END CERTIFICATE-----
      - name: x5tno6mwkncu4m2h.onion
        admins: ["[email protected]"]

For the .onion service, you will need a configured Tor service. Check systemli.onion for more information.

You can also use the systemli.letsencrypt role to automatically set up SSL certificates:

- hosts: servers
  roles:
    - systemli.letsencrypt
    - systemli.prosody
  vars:
    prosody_vhost: example.net
    letsencrypt_cert:
      name: example.net
      domains:
        - example.net
        - conference.example.net
        - proxy.example.net
        - pubsub.example.net
      challenge: dns
      renew_hook: "/usr/bin/prosodyctl --root cert import /etc/letsencrypt/live/"

Tests

You can run local tests using:

molecule test

Make sure you have Molecule, Vagrant, and python-vagrant installed.

To update the variables used in the tests, run:

j2 --customize ~/custom-j2.py templates/test_prosody.yml.j2 defaults/main.yml > molecule/default/tests/test_default.yml

Here’s a simple Python script you can use:

# ~/custom-j2.py

def j2_environment_params():
    """ Extra parameters for the Jinja2 Environment """
    return dict(
        trim_blocks=True,  # Remove whitespace around blocks
    )

License

This project is licensed under the GPL.

Author Information

Visit us at https://www.systemli.org.

Informazioni sul progetto

Install and maintain Prosody from offical repo with Ansible. Tested with Molecule, Docker and Vagrant.

Installa
ansible-galaxy install systemli.prosody
Licenza
Unknown
Download
228
Proprietario
Your friendly tech collective