Merge pull request #1653 from PC-Admin/gomatrixhosting-testing

GoMatrixHosting v0.6.9
This commit is contained in:
Slavi Pantaleev 2022-02-23 14:30:13 +02:00 committed by GitHub
commit d714ee624b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,15 +7,21 @@
regexp: 'matrix_synapse_use_presence' regexp: 'matrix_synapse_use_presence'
replace: 'matrix_synapse_presence_enabled' replace: 'matrix_synapse_presence_enabled'
- name: Generate matrix_homeserver_generic_secret_key variable - name: Search for matrix_homeserver_generic_secret_key variable in matrix_vars.yml
delegate_to: 127.0.0.1
register: presence
shell: "grep -i 'matrix_homeserver_generic_secret_key' /var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml"
no_log: true
- name: Generate matrix_homeserver_generic_secret_key variable if not present
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
command: | command: |
openssl rand -hex 16 openssl rand -hex 16
register: generic_secret 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 ) when: presence is not changed
- name: Add new matrix_homeserver_generic_secret_key variable - name: Add new matrix_homeserver_generic_secret_key variable if not present
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml' path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
@ -23,4 +29,4 @@
insertbefore: '# Basic Settings End' insertbefore: '# Basic Settings End'
mode: '0600' mode: '0600'
state: present state: present
when: ( matrix_homeserver_generic_secret_key is undefined ) or ( matrix_homeserver_generic_secret_key | length == 0 ) when: presence is not changed