ansible-lint

This commit is contained in:
uumas
2023-04-11 23:39:42 +03:00
parent ced8c2314c
commit 53ad104c20
10 changed files with 202 additions and 208 deletions

View File

@@ -1,38 +1,39 @@
---
- name: Fail if not debian
fail:
ansible.builtin.fail:
when: ansible_os_family != "Debian"
- name: Install synapse on debian
include_tasks: install_debian.yml
when: ansible_os_family=="Debian"
- name: Include debian synapse installation tasks
ansible.builtin.include_tasks: install_debian.yml
when: ansible_os_family == "Debian"
- name: Synapse configuration
import_tasks: config.yml
- name: Include synapse configuration tasks
ansible.builtin.import_tasks: config.yml
- name: Install matrix-synapse-shared-secret-auth
pip:
name: 'git+https://github.com/devture/matrix-synapse-shared-secret-auth'
- name: Ensure matrix-synapse-shared-secret-auth is the latest version
ansible.builtin.pip:
name: git+https://github.com/devture/matrix-synapse-shared-secret-auth
state: latest
virtualenv: /opt/venvs/matrix-synapse
notify: config synapse service
notify: Config synapse service
when: synapse_shared_secret_auth is defined
- name: Put systemd units in place
template:
src: "systemd/{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}"
mode: '644'
- name: Ensure synapse systemd units in place
ansible.builtin.template:
src: systemd/{{ item }}.j2
dest: /etc/systemd/system/{{ item }}
mode: 0644
loop:
- matrix-synapse.service
- matrix.target
notify:
- config synapse service
- config matrix target
notify:
- Config synapse service
- Config matrix target
- name: Synapse workers
include_tasks: workers.yml
- name: Include synapse worker tasks
ansible.builtin.include_tasks: workers.yml
when: synapse_workers is defined
- meta: flush_handlers
- name: Run handlers for synapse now
ansible.builtin.meta: flush_handlers