update hookshot private key file mechanism

This commit is contained in:
HarHarLinks
2022-01-11 01:30:57 +01:00
parent 87871040df
commit 65991de61c
4 changed files with 15 additions and 4 deletions

View File

@ -35,7 +35,8 @@ matrix_hookshot_webhook_endpoint: "{{ matrix_hookshot_public_endpoint }}/webhook
# https://half-shot.github.io/matrix-hookshot/setup/github.html
matrix_hookshot_github_enabled: false
matrix_hookshot_github_appid: ''
matrix_hookshot_github_private_key: ''
# manually copy the generated and downloaded GitHub private key to /roles/matrix-bridge-hookshot/files/github-key.pem
matrix_hookshot_github_private_key: 'github-key.pem'
matrix_hookshot_github_secret: '' # "Webhook secret" on the GitHub App page
matrix_hookshot_github_oauth_enabled: false
# you need to configure oauth settings only when you have enabled oauth (optional)

View File

@ -47,6 +47,14 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure hookshot github private key file installed if github is enabled
copy:
src: github-key.pem
dest: "{{ matrix_hookshot_base_path }}/{{ matrix_hookshot_github_private_key }}"
mode: 0600
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure matrix-hookshot.service installed
template:
src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2"

View File

@ -15,7 +15,7 @@ github:
# Authentication for the GitHub App.
#
id: {{ matrix_hookshot_github_appid }}
privateKeyFile: {{ matrix_hookshot_github_private_key }}
privateKeyFile: /data/{{ matrix_hookshot_github_private_key }}
webhook:
# Webhook settings for the GitHub app.
#