update hookshot private key installation method

This commit is contained in:
HarHarLinks
2022-01-23 16:10:25 +01:00
parent 5d07f14235
commit a1a5b16185
3 changed files with 36 additions and 9 deletions

View File

@ -35,8 +35,14 @@ 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: ''
# manually copy the generated and downloaded GitHub private key to roles/matrix-bridge-hookshot/files/private-key.pem
matrix_hookshot_github_private_key: 'private-key.pem'
# set this variable to the contents of the generated and downloaded GitHub private key:
# matrix_hookshot_github_private_key: |
# -----BEGIN RSA PRIVATE KEY-----
# 0123456789ABCDEF...
# -----END RSA PRIVATE KEY-----
# alternatively, leave it empty and do it manually or use matrix-aux instead, see docs/matrix-bridge-hookshot.md for info.
matrix_hookshot_github_private_key: ''
matrix_hookshot_github_private_key_file: 'private-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

@ -64,12 +64,12 @@
- name: Ensure hookshot github private key file installed if github is enabled
copy:
src: private-key.pem
dest: "{{ matrix_hookshot_base_path }}/{{ matrix_hookshot_github_private_key }}"
mode: 0600
content: "{{ matrix_hookshot_github_private_key }}"
dest: "{{ matrix_hookshot_base_path }}/{{ matrix_hookshot_github_private_key_file }}"
mode: 0400
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: "matrix_hookshot_github_enabled|bool"
when: "{{ matrix_hookshot_github_enabled|bool and matrix_hookshot_github_private_key|length }}"
- name: Ensure matrix-hookshot.service installed
template: