Compare commits

...

8 Commits

Author SHA1 Message Date
PC-Admin
466142c446 add database for redlight server 2023-08-23 23:48:42 +08:00
PC-Admin
2944e642e5 update Synapse module section of homeserver.yaml 2023-08-18 22:39:31 +08:00
PC-Admin
4590292e2d add api token for redlight client 2023-08-16 05:18:33 +08:00
PC-Admin
45f9565c38 update redlight module section to include new server variables 2023-08-16 03:54:07 +08:00
PC-Admin
46c2d69c3d redlight variable rename 2023-08-14 22:37:44 +08:00
PC-Admin
9198924162 add new alert bot config variables 2023-08-14 22:29:11 +08:00
PC-Admin
e7b4b3fa56 dynamic config for redlight client module 2023-08-13 23:54:32 +08:00
PC-Admin
bef33e1b79 rename Synapse module names 2023-08-11 02:35:21 +08:00
4 changed files with 55 additions and 14 deletions

View File

@@ -0,0 +1,11 @@
server_name: "duckdomain.xyz"
postgresql_password: "strong-redacted-password"
matrix_admin_email: "perthchat@protonmail.com"
registration_shared_secret: "strong-redacted-password"
testing_user: {
"username": "newuser2500",
"password": "strong-redacted-password",
"admin": True
}

View File

@@ -1,4 +1,5 @@
[matrix_servers] [matrix_servers]
#matrix.penholder.xyz ansible_host=matrix.penholder.xyz ansible_ssh_user=root #matrix.penholder.xyz ansible_host=matrix.penholder.xyz ansible_ssh_user=root
matrix.snowsupport.top ansible_host=matrix.snowsupport.top ansible_ssh_user=root #matrix.snowsupport.top ansible_host=matrix.snowsupport.top ansible_ssh_user=root
matrix.duckdomain.xyz ansible_host=matrix.duckdomain.xyz ansible_ssh_user=root

View File

@@ -26,7 +26,8 @@
name: rsync name: rsync
state: present state: present
- name: Clone redlight module to /tmp - name: Clone redlight module to /tmp to ansible controller
delegate_to: localhost
git: git:
repo: https://code.glowers.club/PC-Admin/redlight.git repo: https://code.glowers.club/PC-Admin/redlight.git
dest: /tmp/redlight dest: /tmp/redlight
@@ -52,12 +53,42 @@
path: /etc/matrix-synapse/homeserver.yaml path: /etc/matrix-synapse/homeserver.yaml
block: | block: |
modules: modules:
- module: hello_world_module.HelloWorldModule - module: redlight_client_module.RedlightClientModule
config: {} # No specific configuration for this module config:
- module: abuse_lookup_module.AbuseLookupModule homeserver_url: "{{ server_name }}"
config: {} redlight_alert_bot_token: "{{ redlight_alert_bot_token }}"
redlight_alert_room: "{{ redlight_alert_room }}"
redlight_server: "{{ redlight_server }}"
redlight_api_token: "{{ redlight_api_token }}"
- module: redlight_server_module.RedlightServerModule
config:
redlight_source_repo_url: "https://code.glowers.club/api/v1/repos/testing-org/rdlist"
redlight_git_token: "{{ redlight_git_token }}"
redlight_source_list_file_path: "dist/summaries.json"
redlight_client_tokens: "{{ redlight_client_tokens }}"
redlight_filtered_tags: {{ redlight_filtered_tags }}
state: present state: present
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
notify: Restart Synapse notify: Restart Synapse
- name: Create matrix_redlight role in PostgreSQL
become: yes
become_user: postgres
postgresql_user:
name: matrix_redlight
password: "{{ redlight_postgresql_password }}"
role_attr_flags: NOSUPERUSER,NOCREATEDB,NOCREATEROLE
encrypted: yes
- name: Create Database for matrix_redlight
become: yes
become_user: postgres
postgresql_db:
name: matrix_redlight
encoding: UTF8
lc_collate: C
lc_ctype: C
template: template0
owner: matrix_redlight

View File

@@ -27,11 +27,9 @@
state: absent state: absent
notify: Restart Nginx notify: Restart Nginx
# - name: Set Synapse Cache Factor - name: Ensure Synapse is running
# lineinfile: service:
# path: /etc/default/matrix-synapse name: matrix-synapse
# regexp: '^SYNAPSE_CACHE_FACTOR=' state: started
# line: 'SYNAPSE_CACHE_FACTOR=2.0' enabled: yes
# state: present notify: Restart Synapse
# create: yes
# notify: Restart Synapse