fix: all praise the allmighty yamllinter

This commit is contained in:
Marko Weltzer 2022-02-05 21:32:54 +01:00
parent d3983a0f04
commit 7e5b88c3b7
373 changed files with 1565 additions and 1296 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,3 +1,4 @@
---
# These are supported funding model platforms
# https://liberapay.com/s.pantaleev/

5
.yamllint Normal file
View File

@ -0,0 +1,5 @@
---
extends: default
rules:
line-length: disable

View File

@ -1,3 +1,4 @@
---
version: '3'
services:
nginx:

View File

@ -1,3 +1,4 @@
---
# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/setup.yml"
when: run_stop|bool
tags:

View File

@ -1,3 +1,5 @@
---
matrix_awx_enabled: true
# Defaults for 'Customise Website + Access Export' template

View File

@ -1,3 +1,4 @@
---
- name: Record Backup Server variables locally on AWX
delegate_to: 127.0.0.1
@ -38,18 +39,18 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/backup_server.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
tags: use-survey
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Copy new 'matrix_vars.yml' to target machine
copy:

View File

@ -1,3 +1,4 @@
---
- name: Record Bridge Discord AppService variables locally on AWX
delegate_to: 127.0.0.1
@ -54,4 +55,4 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -1,3 +1,4 @@
---
- name: Collect current datetime
set_fact:

View File

@ -1,3 +1,4 @@
---
- name: Create a AWX session token for executing modules
awx.awx.tower_token:
@ -7,4 +8,4 @@
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_master_token }}"
register: awx_session_token
no_log: True
no_log: true

View File

@ -1,3 +1,4 @@
---
#
# Create user and define if they are admin
#

View File

@ -48,7 +48,7 @@
- name: Reload vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: Save new 'Customise Website + Access Export' survey.json to the AWX tower, template
delegate_to: 127.0.0.1
@ -92,12 +92,12 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_website_access_export.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: awx_customise_base_domain_website is defined
- name: Recreate 'Access Export' job template
@ -114,12 +114,12 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/access_export.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: awx_customise_base_domain_website is undefined
- name: If user doesn't define a awx_sftp_password, create a disabled 'sftp' account
@ -153,7 +153,7 @@
user:
name: sftp
groups: sftp
append: yes
append: true
when: awx_customise_base_domain_website is defined
- name: Create the ro /chroot directory with sticky bit if it doesn't exist. (/chroot/website has matrix:matrix permissions and is mounted to nginx container)

View File

@ -23,7 +23,7 @@
command: rm /chroot/export/matrix*
count: 1
units: days
unique: yes
unique: true
- name: Delete the AWX session token for executing modules
awx.awx.tower_token:

View File

@ -3,14 +3,14 @@
- name: Include vars in organisation.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/organisation.yml'
no_log: True
no_log: true
- name: Include vars in hosting_vars.yml
include_vars:
file: '/var/lib/awx/projects/hosting/hosting_vars.yml'
no_log: True
no_log: true
- name: Include AWX master token from awx_tokens.yml
include_vars:
file: /var/lib/awx/projects/hosting/awx_tokens.yml
no_log: True
no_log: true

View File

@ -3,7 +3,7 @@
- name: Include new vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: If include_vars succeeds overwrite the old matrix_vars.yml
delegate_to: 127.0.0.1

View File

@ -1,4 +1,4 @@
---
# Load initial hosting and organisation variables from AWX volume
- include_tasks:
file: "load_hosting_and_org_variables.yml"

View File

@ -9,7 +9,7 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Ensure curl and jq intalled on target machine
apt:
@ -22,7 +22,7 @@
shell: du -sh /matrix/postgres/data
register: awx_db_size_before_stat
when: (awx_purge_mode.find("Perform final shrink") != -1)
no_log: True
no_log: true
- name: Collect the internal IP of the matrix-synapse container
shell: "/usr/bin/docker inspect --format '{''{range.NetworkSettings.Networks}''}{''{.IPAddress}''}{''{end}''}' matrix-synapse"
@ -34,7 +34,7 @@
curl -X POST -d '{"type":"m.login.password", "user":"admin-janitor", "password":"{{ awx_janitor_user_password }}"}' "{{ awx_synapse_container_ip.stdout }}:{{ matrix_synapse_container_client_api_port }}/_matrix/client/r0/login" | jq '.access_token'
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
register: awx_janitors_token
no_log: True
no_log: true
- name: Copy build_room_list.py script to target machine
copy:
@ -55,7 +55,7 @@
fetch:
src: /tmp/room_list_complete.json
dest: "/tmp/{{ subscription_id }}_room_list_complete.json"
flat: yes
flat: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
- name: Remove complete room list from target machine
@ -80,7 +80,7 @@
- name: Setting host fact awx_room_list_no_local_users
set_fact:
awx_room_list_no_local_users: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_no_local_users.txt') }}"
no_log: True
no_log: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
- name: Purge all rooms with no local users
@ -113,7 +113,7 @@
set_fact:
awx_room_list_joined_members: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_joined_members.txt') }}"
when: awx_purge_mode.find("Number of users [slower]") != -1
no_log: True
no_log: true
- name: Purge all rooms with more then N users
include_tasks: purge_database_users.yml
@ -138,7 +138,7 @@
set_fact:
awx_room_list_state_events: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_state_events.txt') }}"
when: awx_purge_mode.find("Number of events [slower]") != -1
no_log: True
no_log: true
- name: Purge all rooms with more then N events
include_tasks: purge_database_events.yml
@ -161,17 +161,17 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Execute rust-synapse-compress-state job template
delegate_to: 127.0.0.1
awx.awx.tower_job_launch:
job_template: "{{ matrix_domain }} - 0 - Deploy/Update a Server"
wait: yes
wait: true
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Revert 'Deploy/Update a Server' job template
@ -190,14 +190,14 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Ensure matrix-synapse is stopped
service:
name: matrix-synapse
state: stopped
daemon_reload: yes
daemon_reload: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Re-index Synapse database
@ -208,7 +208,7 @@
service:
name: matrix-synapse
state: started
daemon_reload: yes
daemon_reload: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Adjust 'Deploy/Update a Server' job template
@ -227,17 +227,17 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Execute run-postgres-vacuum job template
delegate_to: 127.0.0.1
awx.awx.tower_job_launch:
job_template: "{{ matrix_domain }} - 0 - Deploy/Update a Server"
wait: yes
wait: true
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Revert 'Deploy/Update a Server' job template
@ -256,7 +256,7 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Cleanup room_list files
@ -264,13 +264,13 @@
shell: |
rm /tmp/{{ subscription_id }}_room_list*
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
ignore_errors: yes
ignore_errors: true
- name: Collect after shrink size of Synapse database
shell: du -sh /matrix/postgres/data
register: awx_db_size_after_stat
when: (awx_purge_mode.find("Perform final shrink") != -1)
no_log: True
no_log: true
- name: Print total number of rooms processed
debug:

View File

@ -1,3 +1,4 @@
---
- name: Ensure dateutils is installed in AWX
delegate_to: 127.0.0.1
@ -8,7 +9,7 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Ensure curl and jq intalled on target machine
apt:
@ -25,7 +26,7 @@
shell: |
curl -XPOST -d '{"type":"m.login.password", "user":"admin-janitor", "password":"{{ awx_janitor_user_password }}"}' "{{ awx_synapse_container_ip.stdout }}:{{ matrix_synapse_container_client_api_port }}/_matrix/client/r0/login" | jq '.access_token'
register: awx_janitors_token
no_log: True
no_log: true
- name: Generate list of dates to purge to
delegate_to: 127.0.0.1
@ -37,16 +38,16 @@
register: awx_local_media_size_before
when: awx_purge_media_type == "Local Media"
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate initial size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_before
when: awx_purge_media_type == "Remote Media"
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Purge local media with loop
include_tasks: purge_media_local.yml
@ -62,15 +63,15 @@
shell: du -sh /matrix/synapse/storage/media-store/local*
register: awx_local_media_size_after
when: awx_purge_media_type == "Local Media"
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate final size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_after
when: awx_purge_media_type == "Remote Media"
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Print size of local media repository before purge
debug:

View File

@ -4,7 +4,7 @@
authorized_key:
user: root
state: present
exclusive: yes
exclusive: true
key: "{{ lookup('file', '/var/lib/awx/projects/hosting/client_public.key') }}"
- name: Delete the AWX session token for executing modules

View File

@ -25,47 +25,47 @@
shell: |
curl -s localhost:9000 | grep "^synapse_admin_mau_current "
register: awx_mau_stat
no_log: True
no_log: true
- name: Calculate CPU usage statistics
shell: iostat -c
register: awx_cpu_usage_stat
no_log: True
no_log: true
- name: Calculate RAM usage statistics
shell: free -mh
register: awx_ram_usage_stat
no_log: True
no_log: true
- name: Calculate free disk space
shell: df -h
register: awx_disk_space_stat
no_log: True
no_log: true
- name: Calculate size of Synapse database
shell: du -sh /matrix/postgres/data
register: awx_db_size_stat
no_log: True
no_log: true
- name: Calculate size of local media repository
shell: du -sh /matrix/synapse/storage/media-store/local*
register: awx_local_media_size_stat
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_stat
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate docker container statistics
shell: docker stats --all --no-stream
register: awx_docker_stats
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Print size of remote media repository
debug:

View File

@ -235,9 +235,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_corporal.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -3,7 +3,7 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: Install jq and curl on remote machine
apt:
@ -97,9 +97,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_dimension.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -172,9 +172,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_element.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -40,4 +40,4 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -37,9 +37,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_jitsi.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -66,7 +66,7 @@
with_dict:
'awx_matrix_ma1sd_auth_store': '{{ awx_matrix_ma1sd_auth_store }}'
'awx_matrix_ma1sd_configuration_extension_yaml': '{{ awx_matrix_ma1sd_configuration_extension_yaml.splitlines() | to_json }}'
no_log: True
no_log: true
- name: Save new 'Configure ma1sd' survey.json to the AWX tower, template
delegate_to: 127.0.0.1
@ -94,10 +94,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_ma1sd.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -36,9 +36,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_email_relay.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -1,3 +1,4 @@
---
- name: Limit max upload size to 200MB part 1
set_fact:
@ -214,9 +215,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_synapse.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -36,9 +36,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_synapse_admin.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

View File

@ -12,7 +12,7 @@
command: |
openssl rand -hex 16
register: generic_secret
no_log: True
no_log: true
when: ( matrix_homeserver_generic_secret_key is undefined ) or ( matrix_homeserver_generic_secret_key | length == 0 )
- name: Add new matrix_homeserver_generic_secret_key variable

View File

@ -1,3 +1,4 @@
---
# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/sanity_check.yml"
tags:
- always

View File

@ -13,7 +13,7 @@
name:
- lsb-release
state: present
update_cache: yes
update_cache: true
register: lsb_release_installation_result
- name: Reread ansible_lsb facts if lsb-release got installed
@ -34,10 +34,10 @@
service:
name: docker
state: started
enabled: yes
enabled: true
- name: "Ensure {{ matrix_ntpd_service }} is started and autoruns"
service:
name: "{{ matrix_ntpd_service }}"
state: started
enabled: yes
enabled: true

View File

@ -6,7 +6,7 @@
- python-docker
- python-dnspython
state: latest
update_cache: yes
update_cache: true
- name: Ensure Docker is installed
pacman:

View File

@ -22,7 +22,7 @@
name:
- "{{ matrix_ntpd_package }}"
state: latest
update_cache: yes
update_cache: true
- name: Ensure Docker is installed
yum:

View File

@ -22,14 +22,14 @@
name:
- epel-release
state: latest
update_cache: yes
update_cache: true
- name: Ensure yum packages are installed
yum:
name:
- "{{ matrix_ntpd_package }}"
state: latest
update_cache: yes
update_cache: true
- name: Ensure Docker is installed
yum:

View File

@ -7,7 +7,7 @@
- ca-certificates
- gnupg
state: present
update_cache: yes
update_cache: true
- name: Ensure Docker's APT key is trusted
apt_key:
@ -22,7 +22,7 @@
apt_repository:
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable"
state: present
update_cache: yes
update_cache: true
when: matrix_docker_installation_enabled|bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure APT packages are installed
@ -30,7 +30,7 @@
name:
- "{{ matrix_ntpd_package }}"
state: latest
update_cache: yes
update_cache: true
- name: Ensure Docker is installed
apt:

View File

@ -7,7 +7,7 @@
- ca-certificates
- gnupg
state: present
update_cache: yes
update_cache: true
- name: Ensure Docker's APT key is trusted
apt_key:
@ -22,7 +22,7 @@
apt_repository:
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
state: present
update_cache: yes
update_cache: true
when: matrix_docker_installation_enabled|bool and matrix_docker_package_name == 'docker-ce'
- name: Ensure APT packages are installed
@ -30,7 +30,7 @@
name:
- "{{ matrix_ntpd_package }}"
state: latest
update_cache: yes
update_cache: true
- name: Ensure Docker is installed
apt:

View File

@ -18,8 +18,8 @@
state: present
group: "{{ matrix_user_groupname }}"
home: "{{ matrix_base_data_path }}"
create_home: no
system: yes
create_home: false
system: true
register: matrix_user
- name: Set Matrix Group UID Variable

View File

@ -1,3 +1,4 @@
---
# We need others to be able to read these directories too,
# so that matrix-nginx-proxy's nginx user can access the files.
#

View File

@ -1,4 +1,4 @@
---
# This is for both CentOS 7 and 8
- name: Ensure fuse installed (CentOS)
yum:

View File

@ -1,4 +1,4 @@
---
# This is for both CentOS 7 and 8
- name: Ensure openssl installed (CentOS)
yum:

View File

@ -1,3 +1,4 @@
---
# This will contain a list of enabled services that the playbook is managing.
# Each component is expected to append its service name to this list.
matrix_systemd_services_list: []

View File

@ -1,3 +1,4 @@
---
# Go-NEB is a Matrix bot written in Go. It is the successor to Matrix-NEB, the original Matrix bot written in Python.
# See: https://github.com/matrix-org/go-neb
@ -228,4 +229,3 @@ matrix_bot_go_neb_configuration_extension: "{{ matrix_bot_go_neb_configuration_e
# Holds the final configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_bot_go_neb_configuration_yaml`.
matrix_bot_go_neb_configuration: "{{ matrix_bot_go_neb_configuration_yaml|from_yaml|combine(matrix_bot_go_neb_configuration_extension, recursive=True) }}"

View File

@ -1,3 +1,5 @@
---
- set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-go-neb.service'] }}"
when: matrix_bot_go_neb_enabled|bool

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -40,7 +40,7 @@
- name: Ensure systemd reloaded after matrix-bot-go-neb.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_go_neb_systemd_service_result.changed|bool"
- name: Ensure matrix-bot-go-neb.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-bot-go-neb
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
register: stopping_result
when: "matrix_bot_go_neb_service_stat.stat.exists|bool"
@ -22,7 +22,7 @@
- name: Ensure systemd reloaded after matrix-bot-go-neb.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_go_neb_service_stat.stat.exists|bool"
- name: Ensure Matrix go-neb paths don't exist

View File

@ -1,3 +1,4 @@
---
# honoroit is a helpdesk bot
# See: https://gitlab.com/etke.cc/honoroit

View File

@ -1,3 +1,5 @@
---
- set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-honoroit.service'] }}"
when: matrix_bot_honoroit_enabled|bool

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -70,7 +70,7 @@
build:
dockerfile: Dockerfile
path: "{{ matrix_bot_honoroit_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_bot_honoroit_container_image_self_build|bool"
- name: Ensure matrix-bot-honoroit.service installed
@ -82,7 +82,7 @@
- name: Ensure systemd reloaded after matrix-bot-honoroit.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_honoroit_systemd_service_result.changed|bool"
- name: Ensure matrix-bot-honoroit.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-bot-honoroit
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
register: stopping_result
when: "matrix_bot_honoroit_service_stat.stat.exists|bool"
@ -22,7 +22,7 @@
- name: Ensure systemd reloaded after matrix-bot-honoroit.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_honoroit_service_stat.stat.exists|bool"
- name: Ensure Matrix honoroit paths don't exist

View File

@ -1,3 +1,4 @@
---
# matrix-reminder-bot is a bot for one-off and recurring reminders
# See: https://github.com/anoadragon453/matrix-reminder-bot

View File

@ -1,3 +1,5 @@
---
- set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-reminder-bot.service'] }}"
when: matrix_bot_matrix_reminder_bot_enabled|bool

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -65,7 +65,7 @@
build:
dockerfile: docker/Dockerfile
path: "{{ matrix_bot_matrix_reminder_bot_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_bot_matrix_reminder_bot_container_image_self_build|bool"
- name: Ensure matrix-reminder-bot config installed
@ -85,7 +85,7 @@
- name: Ensure systemd reloaded after matrix-bot-matrix-reminder-bot.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_matrix_reminder_bot_systemd_service_result.changed|bool"
- name: Ensure matrix-bot-matrix-reminder-bot.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-bot-matrix-reminder-bot
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
register: stopping_result
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists|bool"
@ -22,7 +22,7 @@
- name: Ensure systemd reloaded after matrix-bot-matrix-reminder-bot.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists|bool"
- name: Ensure Matrix matrix-reminder-bot paths don't exist

View File

@ -1,3 +1,4 @@
---
# A moderation tool for Matrix
# See: https://github.com/matrix-org/mjolnir
@ -56,4 +57,3 @@ matrix_bot_mjolnir_configuration_extension: "{{ matrix_bot_mjolnir_configuration
# Holds the final configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_bot_mjolnir_configuration_yaml`.
matrix_bot_mjolnir_configuration: "{{ matrix_bot_mjolnir_configuration_yaml|from_yaml|combine(matrix_bot_mjolnir_configuration_extension, recursive=True) }}"

View File

@ -1,3 +1,4 @@
---
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407
- name: Fail if trying to self-build on Ansible < 2.8

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -42,7 +42,7 @@
build:
dockerfile: Dockerfile
path: "{{ matrix_bot_mjolnir_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_bot_mjolnir_container_image_self_build|bool"
- name: Ensure matrix-bot-mjolnir config installed
@ -62,7 +62,7 @@
- name: Ensure systemd reloaded after matrix-bot-mjolnir.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_mjolnir_systemd_service_result.changed|bool"
- name: Ensure matrix-bot-mjolnir.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-bot-mjolnir
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
register: stopping_result
when: "matrix_bot_mjolnir_service_stat.stat.exists|bool"
@ -22,7 +22,7 @@
- name: Ensure systemd reloaded after matrix-bot-mjolnir.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_bot_mjolnir_service_stat.stat.exists|bool"
- name: Ensure matrix-bot-mjolnir paths don't exist

View File

@ -1,3 +1,4 @@
---
# matrix-appservice-discord is a Matrix <-> Discord bridge
# See: https://github.com/Half-Shot/matrix-appservice-discord

View File

@ -1,3 +1,4 @@
---
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
# We don't want to fail in such cases.
- name: Fail if matrix-synapse role already executed

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -54,8 +54,8 @@
service:
name: matrix-appservice-discord
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
failed_when: false
when: "matrix_appservice_discord_stat_db.stat.exists"
@ -105,7 +105,7 @@
- name: Ensure systemd reloaded after matrix-appservice-discord.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_discord_systemd_service_result.changed"
- name: Ensure matrix-appservice-discord.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-appservice-discord
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_appservice_discord_service_stat.stat.exists"
- name: Ensure matrix-appservice-discord.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-appservice-discord.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_discord_service_stat.stat.exists"

View File

@ -1,3 +1,4 @@
---
# Matrix Appservice IRC is a Matrix <-> IRC bridge
# See: https://github.com/matrix-org/matrix-appservice-irc

View File

@ -1,3 +1,4 @@
---
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407
- name: Fail if trying to self-build on Ansible < 2.8

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -1,3 +1,5 @@
---
- name: Fail if Postgres not enabled
fail:
msg: "Postgres via the matrix-postgres role is not enabled (`matrix_postgres_enabled`). Cannot migrate."
@ -16,7 +18,7 @@
service:
name: matrix-postgres
state: started
daemon_reload: yes
daemon_reload: true
register: matrix_postgres_service_start_result
- name: Wait a bit, so that Postgres can start

View File

@ -26,7 +26,7 @@
service:
name: matrix-appservice-irc
state: stopped
daemon_reload: yes
daemon_reload: true
failed_when: false
- name: (Data relocation) Move AppService IRC passkey.pem file to ./data directory
@ -82,7 +82,7 @@
build:
dockerfile: Dockerfile
path: "{{ matrix_appservice_irc_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_appservice_irc_enabled|bool and matrix_appservice_irc_container_image_self_build|bool and matrix_appservice_irc_git_pull_results.changed"
- name: Ensure Matrix Appservice IRC config installed
@ -186,7 +186,7 @@
- name: Ensure systemd reloaded after matrix-appservice-irc.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_irc_systemd_service_result.changed"
- name: Ensure matrix-appservice-irc.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-appservice-irc
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_appservice_irc_service_stat.stat.exists"
- name: Ensure matrix-appservice-irc.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-appservice-irc.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_irc_service_stat.stat.exists"

View File

@ -1,3 +1,4 @@
---
# matrix-appservice-slack is a Matrix <-> Slack bridge
# See: https://github.com/matrix-org/matrix-appservice-slack

View File

@ -1,3 +1,4 @@
---
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407
- name: Fail if trying to self-build on Ansible < 2.8

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -1,3 +1,5 @@
---
- name: Fail if Postgres not enabled
fail:
msg: "Postgres via the matrix-postgres role is not enabled (`matrix_postgres_enabled`). Cannot migrate."
@ -16,7 +18,7 @@
service:
name: matrix-postgres
state: started
daemon_reload: yes
daemon_reload: true
register: matrix_postgres_service_start_result
- name: Wait a bit, so that Postgres can start

View File

@ -56,7 +56,7 @@
build:
dockerfile: Dockerfile
path: "{{ matrix_appservice_slack_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_appservice_slack_container_image_self_build|bool and matrix_appservice_slack_git_pull_results.changed"
- name: Ensure Matrix Appservice Slack config installed
@ -84,7 +84,7 @@
- name: Ensure systemd reloaded after matrix-appservice-slack.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_slack_systemd_service_result.changed"
- name: Ensure matrix-appservice-slack.service restarted, if necessary

View File

@ -9,8 +9,8 @@
service:
name: matrix-appservice-slack
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_appservice_slack_service_stat.stat.exists"
- name: Ensure matrix-appservice-slack.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-appservice-slack.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_slack_service_stat.stat.exists"

View File

@ -1,3 +1,4 @@
---
# matrix-appservice-webhooks is a Matrix <-> webhook bridge
# See: https://github.com/redoonetworks/matrix-appservice-webhooks

View File

@ -1,3 +1,4 @@
---
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
# We don't want to fail in such cases.
- name: Fail if matrix-synapse role already executed

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -40,7 +40,7 @@
build:
dockerfile: "{{ matrix_appservice_webhooks_container_image_self_build_repo_dockerfile_path }}"
path: "{{ matrix_appservice_webhooks_docker_src_files_path }}"
pull: yes
pull: true
when: "matrix_appservice_webhooks_container_image_self_build|bool"
- name: Ensure Matrix Appservice webhooks config is installed
@ -84,5 +84,5 @@
- name: Ensure systemd reloaded after matrix-appservice-webhooks.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_webhooks_systemd_service_result.changed"

View File

@ -9,8 +9,8 @@
service:
name: matrix-appservice-webhooks
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_appservice_webhooks_service_stat.stat.exists"
- name: Ensure matrix-appservice-webhooks.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-appservice-webhooks.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_appservice_webhooks_service_stat.stat.exists"

View File

@ -1,3 +1,4 @@
---
# beeper-linkedin is a Matrix <-> LinkedIn bridge
# See: https://gitlab.com/beeper/linkedin

View File

@ -1,3 +1,5 @@
---
- set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-beeper-linkedin.service'] }}"
when: matrix_beeper_linkedin_enabled|bool

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -60,7 +60,7 @@
build:
dockerfile: Dockerfile
path: "{{ matrix_beeper_linkedin_docker_src_files_path }}"
pull: yes
pull: true
args:
TARGETARCH: "{{ matrix_architecture }}"
when: "matrix_beeper_linkedin_container_image_self_build|bool"
@ -90,5 +90,5 @@
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_beeper_linkedin_systemd_service_result.changed"

View File

@ -9,8 +9,8 @@
service:
name: matrix-beeper-linkedin
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_beeper_linkedin_service_stat.stat.exists"
- name: Ensure matrix-beeper-linkedin.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_beeper_linkedin_service_stat.stat.exists"

View File

@ -8,4 +8,3 @@
with_items:
- "matrix_beeper_linkedin_appservice_token"
- "matrix_beeper_linkedin_homeserver_token"

View File

@ -1,3 +1,4 @@
---
# heisenbridge is a bouncer-style Matrix IRC bridge
# See: https://github.com/hifi/heisenbridge

View File

@ -1,3 +1,4 @@
---
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
# We don't want to fail in such cases.
- name: Fail if matrix-synapse role already executed

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -34,5 +34,5 @@
- name: Ensure systemd reloaded after matrix-heisenbridge.service installation
service:
daemon_reload: yes
daemon_reload: true
when: matrix_heisenbridge_systemd_service_result.changed

View File

@ -9,8 +9,8 @@
service:
name: matrix-heisenbridge
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
when: "matrix_heisenbridge_service_stat.stat.exists"
- name: Ensure matrix-heisenbridge.service doesn't exist
@ -21,5 +21,5 @@
- name: Ensure systemd reloaded after matrix-heisenbridge.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_heisenbridge_service_stat.stat.exists"

View File

@ -1,3 +1,5 @@
---
# A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
# https://github.com/Half-Shot/matrix-hookshot

View File

@ -1,3 +1,4 @@
---
# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist.
# We don't want to fail in such cases.
- name: Fail if matrix-synapse role already executed

View File

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always

View File

@ -80,5 +80,5 @@
- name: Ensure systemd reloaded after matrix-hookshot.service installation
service:
daemon_reload: yes
daemon_reload: true
when: matrix_hookshot_systemd_service_result.changed

Some files were not shown because too many files have changed in this diff Show More