Slavi Pantaleev 24f3493caf Add various polish to Conduwuit
https://github.com/Virkkunen and I have been working on the same feature
simultaneously.

This patch adds my additional independent work on top of his changes.

Notable changes here compared to Virkkunen's original work:

- renaming config-related variables (`matrix_conduwuit_*` ->
  `matrix_conduwuit_config_*`). This is consistent with other roles (and
  better), but deviates from how the Conduit role was implemented.

- using a full configuration sample from https://conduwuit.puppyirl.gay/configuration.html
  instead of using the old Conduit config file template

- introducing configurability for more Conduwuit config settings, to support easy registration, etc.

- removing configuration settings that Conduwuit does not support
  anymore (e.g. `max_concurrent_requests`)

- cross-linking docs pages for Conduit and Conduwuit

- a Conduwuit docs page which is much improved compared to the old
  Conduit one

- REAMDE updates
2025-01-19 16:06:37 +02:00

61 lines
2.3 KiB
YAML

---
- name: Ensure conduwuit config path exists
ansible.builtin.file:
path: "{{ matrix_conduwuit_config_path }}"
state: directory
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure conduwuit data path exists
ansible.builtin.file:
path: "{{ matrix_conduwuit_data_path }}"
state: directory
mode: 0770
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure conduwuit configuration installed
ansible.builtin.template:
src: "{{ matrix_conduwuit_template_conduwuit_config }}"
dest: "{{ matrix_conduwuit_config_path }}/conduwuit.toml"
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure conduwuit support files installed
ansible.builtin.template:
src: "{{ role_path }}/templates/{{ item }}.j2"
dest: "{{ matrix_conduwuit_base_path }}/{{ item }}"
mode: 0640
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- labels
- env
- name: Ensure conduwuit container network is created
community.general.docker_network:
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
name: "{{ matrix_conduwuit_container_network }}"
driver: bridge
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
- name: Ensure conduwuit container image is pulled
community.docker.docker_image:
name: "{{ matrix_conduwuit_docker_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_conduwuit_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_conduwuit_docker_image_force_pull }}"
register: result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed
- name: Ensure matrix-conduwuit.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-conduwuit.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduwuit.service"
mode: 0644